RE: updated ohci driver
Brought to you by:
aeb,
bencollins
From: Sebastien R. <seb...@an...> - 2000-12-07 00:29:11
|
I fixed the tcode, and also set the speed to S100 for PHY packets to comply with the ohci spec. BTW, has anybody try to modify the #define USE_DEVICE in ohci1394.h ? IF I don't get any complaints, then I will use the pci_find_class() method in the next release. Sebastien Rougeaux Seeing Machines -----Original Message----- From: lin...@li... [mailto:lin...@li...]On Behalf Of Gord Peters Sent: Thursday, December 07, 2000 4:00 AM To: se...@se... Cc: Linux 1394 Developer List Subject: RE: updated ohci driver > I have updated the ohci driver with several functionalities > (submitted by Andreas Tobler, Adam Richter, Gord Peters and > myself). ... > new hook proposed by Andreas Bombe, added the (packet->type==raw) > case for the transmission of phy packets, and changed the The PHY packet transmission code you added doesn't work with the PHY packets constructed by the hpsb_make_phypacket() routine I created. The reason is because you use packet->header[0] as part of the first data quadlet of the outgoing data. Here's the snippet of code: d->prg_cpu[idx]->data[0] = packet->speed_code<<16 | (packet->header[0] & 0xFFFF); if (packet->type == raw) { d->prg_cpu[idx]->data[1] = packet->header[1]; d->prg_cpu[idx]->data[2] = packet->header[2]; } The problem with this is that you rely on the tcode already being encoded in the packet header. However, as Andreas pointed out, the tcode 0xE is an OHCI specific tcode (and thus shouldn't be used in the general purpose section of the driver). My PHY packet construction code in hpsb_make_phypacket() just puts the data into the packet header, and leaves construction of the packet control information (data[0] in this case) to the specific driver since the PCILynx driver doesn't require such information for raw data packets. Thus, the packet header is constructed as follows: packet->header[0]= data; packet->header[1]= ~data; And the OHCI driver sends raw packets like this: if (packet->type == raw) { d->prg_cpu[idx]->data[0] = packet->speed_code<<16|0xE0; d->prg_cpu[idx]->data[1] = packet->header[0]; d->prg_cpu[idx]->data[2] = packet->header[1]; } The tcode 0xE could be defined as OHCI1394_TCODE_PHY in ohci1394.h to make it more clear what is going on there. Gord _______________________________________________ mailing list lin...@li... http://lists.sourceforge.net/mailman/listinfo/linux1394-devel |