On Wed, 19 Mar 2008, Bartlomiej Zolnierkiewicz wrote:.. and years of drive_cmd_intr() which is much more widely used is *not* in agreement. First off, the patch I sent out _works_. Secondly, it's a hell of a lot more robust than yours is, exactly because it doesn't get confused if the data direction or size bit disagrees with the particular command in question. .. and what about all the magic special IDE commands that may be drive-specific? What are we going to do about them? In other words, we should not try to create an impossible-to-maintain piece of shit code that does the wrong thing if you send a command to the drive that the IDE layer doesn't understand (but the sending code hopefully does). We should make the core IDE code *robust*. Your "real fix" is nothing of the sort. It's just a workaround for the fragility of the code that looks at the drive status. The real fix is to be robust in the face of even unexpected drive status codes, *especially* for the code that handles commands injected by the user! In other words, you can talk about protocol specifications for things like the regular filesystem READ/WRITE commands. But don't create total crap like this that depends on the code knowing all possible outcomes of every single possible command. Your patch is utter crap. You say (about commit 18a056feccabdfa9764016a615121b194828bc72): I would call that *correct*. And my point is, we used to be better. You made the code buggy and fragile with that crap commit, and with the others like it (ie the already much-mentioned commit 4d977e43d8ae758434e603cf2455d955f71c77c4). And that is and was *exactly* my point. The reason I called the taskfile code horrible was exactly the fact that it only worked if it thought it knew exactly what was going on. Deciding what to do based on the DRQ bit (and the READY/BUSY/ERROR bits) is the *right* thing to do. It's the intelligent approach - actually tekign the response of the hardware into account, and being robust. The *stupid* and horrible thing to do is to think that you know better than what the hardware tells you, and think that you can look up every command that the user sends in the spec and use *that* to figure out what to do. Trust the hardware, not the paper. Don't make the code only work when you think you know what is going on. Make the code work _always_. In short, there is no way in hell I'll apply a workaround patch for crap code, when we already know what the robust solution is. Linus --
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Alistair John Strachan | cpu time oddity (was Re: Linux 2.6.27-rc5) |
| Linus Torvalds | Linux 2.6.27 |
git: | |
| Jakub Narebski | Git User's Survey 2007 unfinished summary continued |
| Johannes Sixt | [PATCH 02/40] Compile some programs only conditionally. |
| Linus Torvalds | [PATCH 0/6] Initial subproject support (RFC?) |
| Linus Torvalds | I'm a total push-over.. |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
| Jeff Garzik | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Steve French | Fwd: [PATCH] Fix CIFS compilation with CONFIG_KEYS unset |
| Simon Horman | Possible regression in HTB |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Doug Fordham | Re: Real men don't attack straw men |
| Jerome Santos | sshd.config and AllowUsers |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| usb mic not detected | 2 minutes ago | Applications and Utilities |
| Treason Uncloaked | 5 hours ago | Linux kernel |
| Shared swap partition | 16 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 2 days ago | Linux kernel |
