<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Segher Boessenkool wrote:
<blockquote
 cite="mid16B26BE8-9549-4613-874F-436338899454@kernel.crashing.org"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">Also when it comes to enabling the IDE controller in compatibilty mode
(reg 0x42) the non working versions reports it contains 0xc9, the
working version reports the same register as 0.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You need to set the prog-if field in the PCI config space
for the controller to 0x8a, not 0x8f, before doing the BAR
allocation to get legacy mode.  Did you do this?


Segher


  </pre>
</blockquote>
I am not sure about the order of things, however according to the PCI
IDE controller document you pointed me to 0x8a is fine as bits 0 &
2 are don't care.<br>
Incidentally both working and non working version set the same values.<br>
<br>
The biggest change that I can see is that 2 of the elements in the bus
structure have changed from unsigned char's to unsigned 16 bit types.
Also in all of the pci read/write functions, the where parameter has
changed from a char to an int. So my initial thoughts is that one of
these changes has had a nasty side effect someplace but I can't find
anything as yet.<br>
<br>
Apart from those changes the code is mostly the same. Of course
something may be causing a condition #define to compile in something
different, although I can't see anything different in any of the config
files. I am only comparing files that I think are being used, so it is
possible that I am missing something.<br>
<br>
Anyway I am going to add alot of debug prints to the pci read/write
functions in both working and non working versions and then do a file
compare to see if anything is different.<br>
<br>
It is probably the sort of bug that is so obvious once you see it, but
look perfectly  ok until then<br>
<br>
Ben<br>
</body>
</html>