Mult mode bug in ide.c, v4.11?

Jonathan Hankins (jhankins@pc11.hhs.homewood.k12.al.us)
Mon, 7 Aug 1995 02:44:44 -0500 (CDT)


I think I found a bug (oversight?) in ide.c c4.11. When setting the
#define INITIAL_MULT_COUNT line to 32 (or whatever sector count) and
then compiling, multiple mode still isnt turned on (it isnt that it just
doesnt print the message, hdparm verifies that mult mode is in fact off).
This worked in v1.2.8, and I assume in other pre-4.11 ide.c kernels. I
dont know a lot about C (yet ;) but from playing around for a while, I
found that like 880 says:

---snip from set_multmode_intr function---
} else if (!dev->be_quiet) {
if ((dev->mult_count = dev->mult_req))
printk (" %s: enabled %d-sector multiple mode\n",
dev->name, dev->mult_count);
---snip---

the (!dev->be_quiet) part indicates that if dev->be_quiet is a zero
value, then if mult count is equal to the requested count, it prints the
mult mode enabled message, right? Well, earlier (line 321), be_quiet is
declared as 1, (I think) Anyway, removing the ! makes it work. I dont
know why this affects the enabling of mult mode--it looks like it should
just suppress the message. But, as I said, I am new to C. But it does
turn it on if you make this change. Is this a more complex problem than I am
seeing?

--Hope this problem hasnt a;ready been addressed--it was still present in
kernel 1.3.15, so I assumed it hadn't come up ;-)

Jonathan

+----------------------------------------------------------+
|Homewood High School | Jonathan Hankins |
|http://199.88.16.12/homewood.html | jhankins@199.88.16.12 |
|----------------------------------------------------------|
| Do I know you? |
+----------------------------------------------------------+