Ron,
I'm going to add several lines in amd8111_enable of amd8111.c to disable USB2 in amd8111.
/* disable usb2 in amd 8111 because it does not work awlays*/ byte = pci_read_config8(lpc_dev, 0x47); byte |= (1<<7); pci_write_config8(lpc_dev, 0x47, byte);
Also will remove several lines in amd8111_ide.c
/* The AMD768 has a bug where the BM DMA address must be * 256 byte aligned while it is only 16 bytes long. * Hard code this to a valid address below 0x1000 * where automatic port address assignment starts. * FIXME: I assume the 8111 does the same thing. We should * clarify. stepan@suse.de */ pci_write_config32(dev, 0x20, 0xf01);
pci_write_config32(dev, 0x48, 0x205e5e5e); word = 0x06a; pci_write_config16(dev, 0x4c, word);
and add
byte = 0x20 ; // Latency: 64-->32 pci_write_config8(dev, 0xd, byte);
regards
YH
* YhLu YhLu@tyan.com [040505 07:26]:
Ron,
I'm going to add several lines in amd8111_enable of amd8111.c to disable USB2 in amd8111.
[..]
Also will remove several lines in amd8111_ide.c
/* The AMD768 has a bug where the BM DMA address must be * 256 byte aligned while it is only 16 bytes long. * Hard code this to a valid address below 0x1000 * where automatic port address assignment starts. * FIXME: I assume the 8111 does the same thing. We should * clarify. stepan@suse.de */ pci_write_config32(dev, 0x20, 0xf01); pci_write_config32(dev, 0x48, 0x205e5e5e); word = 0x06a; pci_write_config16(dev, 0x4c, word);
Fine. This should definitely go away, it's a dinosaur. ;)
and add
byte = 0x20 ; // Latency: 64-->32 pci_write_config8(dev, 0xd, byte);
Am I just the only guy picky about this? I do prefer C style comments a lot over C++ style when it comes down to permanent commenent. // is typed so quickly that it qualifies for debugging comments that are probably going away later on. But this is only cosmetics and does not really matter.
Stefan
On Tue, 4 May 2004, YhLu wrote:
I'm going to add several lines in amd8111_enable of amd8111.c to disable USB2 in amd8111.
/* disable usb2 in amd 8111 because it does not work awlays*/ byte = pci_read_config8(lpc_dev, 0x47); byte |= (1<<7); pci_write_config8(lpc_dev, 0x47, byte);
this is the wrong way to do this, please don't do it just yet.
The right way to do it is in the config file.
I will look at your code and we'll send an example.
Also will remove several lines in amd8111_ide.c
/* The AMD768 has a bug where the BM DMA address must be * 256 byte aligned while it is only 16 bytes long. * Hard code this to a valid address below 0x1000 * where automatic port address assignment starts. * FIXME: I assume the 8111 does the same thing. We should * clarify. stepan@suse.de */ pci_write_config32(dev, 0x20, 0xf01); pci_write_config32(dev, 0x48, 0x205e5e5e); word = 0x06a; pci_write_config16(dev, 0x4c, word);
why?
and add
byte = 0x20 ; // Latency: 64-->32 pci_write_config8(dev, 0xd, byte);
which is needed because ...
Let's talk some more.
ron
On Wed, 5 May 2004, ron minnich wrote:
On Tue, 4 May 2004, YhLu wrote:
I'm going to add several lines in amd8111_enable of amd8111.c to disable USB2 in amd8111.
/* disable usb2 in amd 8111 because it does not work awlays*/ byte = pci_read_config8(lpc_dev, 0x47); byte |= (1<<7); pci_write_config8(lpc_dev, 0x47, byte);
this is the wrong way to do this, please don't do it just yet.
ok, the other two changes look fine.
This disabling is fine if the kernel can later re-enable, but I doubt the kernel will do that. We need a way to make this usb enable/disable visible at configuration time, so people can turn on/off as needed, unless usb2.0 on the 8111 NEVER work. I am willing to guess it will work someday, and this built-in disable will come back to bite us.
ron
ron minnich rminnich@lanl.gov writes:
On Tue, 4 May 2004, YhLu wrote:
I'm going to add several lines in amd8111_enable of amd8111.c to disable USB2 in amd8111.
/* disable usb2 in amd 8111 because it does not work awlays*/ byte = pci_read_config8(lpc_dev, 0x47); byte |= (1<<7); pci_write_config8(lpc_dev, 0x47, byte);
this is the wrong way to do this, please don't do it just yet.
The right way to do it is in the config file.
I will look at your code and we'll send an example.
The code should already exist to do this.
Also will remove several lines in amd8111_ide.c
/* The AMD768 has a bug where the BM DMA address must be * 256 byte aligned while it is only 16 bytes long. * Hard code this to a valid address below 0x1000 * where automatic port address assignment starts. * FIXME: I assume the 8111 does the same thing. We should * clarify. stepan@suse.de */ pci_write_config32(dev, 0x20, 0xf01); pci_write_config32(dev, 0x48, 0x205e5e5e); word = 0x06a; pci_write_config16(dev, 0x4c, word);
why?
We should provide the necessary information to the resource allocator to do this. The extra alignment probably isn't needed but it should not be hard to implement.
and add
byte = 0x20 ; // Latency: 64-->32 pci_write_config8(dev, 0xd, byte);
which is needed because ...
Let's talk some more.
Latency should certainly be a general PCI thing unless there is a good alternative.
Eric
On Tue, 2004-05-04 at 23:26, YhLu wrote:
Ron,
I'm going to add several lines in amd8111_enable of amd8111.c to disable USB2 in amd8111.
/* disable usb2 in amd 8111 because it does not work awlays*/ byte = pci_read_config8(lpc_dev, 0x47); byte |= (1<<7); pci_write_config8(lpc_dev, 0x47, byte);
isn't that what the on/off in the config file and this code in amd8111.c doing ?
reg = reg_old = pci_read_config16(lpc_dev, 0x48); reg &= ~(1 << index); if (dev->enabled) { reg |= (1 << index); } if (reg != reg_old) { pci_write_config16(lpc_dev, 0x48, reg); }
Ollie
On Wed, 5 May 2004, Li-Ta Lo wrote:
On Tue, 2004-05-04 at 23:26, YhLu wrote:
Ron,
I'm going to add several lines in amd8111_enable of amd8111.c to disable USB2 in amd8111.
/* disable usb2 in amd 8111 because it does not work awlays*/ byte = pci_read_config8(lpc_dev, 0x47); byte |= (1<<7); pci_write_config8(lpc_dev, 0x47, byte);
isn't that what the on/off in the config file and this code in amd8111.c doing ?
reg = reg_old = pci_read_config16(lpc_dev, 0x48); reg &= ~(1 << index); if (dev->enabled) { reg |= (1 << index); } if (reg != reg_old) { pci_write_config16(lpc_dev, 0x48, reg); }
yes.
ron