2002-01-16 19:12:47

by john e weber

[permalink] [raw]
Subject: linux-2.5.3-pre1 and IDE Driver Trouble


linux-2.5.3-pre1 freezes when using hdparm.
The exact command issued:
/sbin/hdparm -m16 -d1 -c3 -A1 /dev/hda

Specifically, it freezes when attempting to set multimode (hdparm -m16);
all other options work fine.

This doesn't seem to be a big problem, as I have my kernel configured to
use multi-mode by default. So the kernel sets it to the right value (16)
by default.

It doesn't print any messages, so please let me know if there
is anything else I should try.

I keep forgetting to send all my system info with my emails, so:

Linux 2.5.3-pre1
GCC 2.96-98
128 MB RAM
Pentium III, Intel 443BX System Chipset (Intel PIIX4 IDE Interface)

--
John Weber
(AKA [email protected]) HOME
(AKA [email protected]) WORK/SCHOOL
(AKA The NOTORIOUS BIG ENDIAN) ALL AROUND DA WORLD


2002-01-16 21:27:49

by Andre Hedrick

[permalink] [raw]
Subject: DO NOT USE IT (Re: linux-2.5.3-pre1 and IDE Driver Trouble) FATAL



This is a problem that is bigger than simplely issueing a simple
setfeatures non-data-pio command. All of the PIO data-phases are broken.
Nothing works but DMA, and there is no reason it should fail.

Something has gone totally wrong between the 2.5.1 patch submitted to it
being applied for the creation of 2.5.3-pre1.

If the driver falls out of DMA, DEADBOX!!!!
There is a conflict of BIO and ACB and it is very fatal.

Therefore I will have to withdraw the patch and resubmit with the legacy
data-path added back so the kernel development can continue.

The only kernel in the development series known to work is 2.5.1.
However it appears that several people can not successfully use this
CodeBase either.

Until I can submit a new patch witch is a replacement, do not attempt
2.5.3-pre1 at all.

On Wed, 16 Jan 2002, john e weber wrote:

>
> linux-2.5.3-pre1 freezes when using hdparm.
> The exact command issued:
> /sbin/hdparm -m16 -d1 -c3 -A1 /dev/hda
>
> Specifically, it freezes when attempting to set multimode (hdparm -m16);
> all other options work fine.
>
> This doesn't seem to be a big problem, as I have my kernel configured to
> use multi-mode by default. So the kernel sets it to the right value (16)
> by default.
>
> It doesn't print any messages, so please let me know if there
> is anything else I should try.
>
> I keep forgetting to send all my system info with my emails, so:
>
> Linux 2.5.3-pre1
> GCC 2.96-98
> 128 MB RAM
> Pentium III, Intel 443BX System Chipset (Intel PIIX4 IDE Interface)
>
> --
> John Weber
> (AKA [email protected]) HOME
> (AKA [email protected]) WORK/SCHOOL
> (AKA The NOTORIOUS BIG ENDIAN) ALL AROUND DA WORLD
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

Andre Hedrick
Linux Disk Certification Project Linux ATA Development

2002-01-17 07:37:03

by Jens Axboe

[permalink] [raw]
Subject: Re: DO NOT USE IT (Re: linux-2.5.3-pre1 and IDE Driver Trouble) FATAL

--- /opt/kernel/linux-2.5.3-pre1/drivers/ide/ide-taskfile.c Wed Jan 16 02:25:35 2002
+++ drivers/ide/ide-taskfile.c Thu Jan 17 00:29:27 2002
@@ -723,6 +723,7 @@
byte io_32bit = drive->io_32bit;
struct request *rq = HWGROUP(drive)->rq;
char *pBuf = NULL;
+ unsigned long flags;

if (!OK_STAT(stat,DATA_READY,BAD_R_STAT)) {
if (stat & (ERR_STAT|DRQ_STAT)) {
@@ -735,11 +736,12 @@
}
}
DTF("stat: %02x\n", stat);
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);
DTF("Read: %p, rq->current_nr_sectors: %d\n", pBuf, (int) rq->current_nr_sectors);

drive->io_32bit = 0;
taskfile_input_data(drive, pBuf, SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;

if (--rq->current_nr_sectors <= 0) {
@@ -809,6 +811,7 @@
byte io_32bit = drive->io_32bit;
struct request *rq = HWGROUP(drive)->rq;
char *pBuf = NULL;
+ unsigned long flags;

if (!OK_STAT(stat,DATA_READY,BAD_R_STAT)) {
if (stat & (ERR_STAT|DRQ_STAT)) {
@@ -834,10 +837,11 @@
*/
nsect = 1;
while (rq->current_nr_sectors) {
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);
DTF("Multiread: %p, nsect: %d, rq->current_nr_sectors: %ld\n", pBuf, nsect, rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_input_data(drive, pBuf, nsect * SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors -= nsect;
@@ -849,12 +853,13 @@
#endif /* ALTSTAT_SCREW_UP */

nsect = (rq->current_nr_sectors > msect) ? msect : rq->current_nr_sectors;
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);

DTF("Multiread: %p, nsect: %d , rq->current_nr_sectors: %ld\n",
pBuf, nsect, rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_input_data(drive, pBuf, nsect * SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors -= nsect;
@@ -913,6 +918,7 @@
byte io_32bit = drive->io_32bit;
struct request *rq = HWGROUP(drive)->rq;
char *pBuf = NULL;
+ unsigned long flags;

if (!rq->current_nr_sectors) {
ide_end_request(1, HWGROUP(drive));
@@ -924,10 +930,11 @@
}
if ((rq->current_nr_sectors==1) ^ (stat & DRQ_STAT)) {
rq = HWGROUP(drive)->rq;
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);
DTF("write: %p, rq->current_nr_sectors: %d\n", pBuf, (int) rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_output_data(drive, pBuf, SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors--;
@@ -961,6 +968,7 @@
struct request *rq = HWGROUP(drive)->rq;
ide_hwgroup_t *hwgroup = HWGROUP(drive);
char *pBuf = NULL;
+ unsigned long flags;

/*
* (ks/hs): Handle last IRQ on multi-sector transfer,
@@ -994,10 +1002,11 @@
if (!msect) {
nsect = 1;
while (rq->current_nr_sectors) {
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_unmap_buffer(rq, &flags);
DTF("Multiwrite: %p, nsect: %d, rq->current_nr_sectors: %ld\n", pBuf, nsect, rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_output_data(drive, pBuf, nsect * SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors -= nsect;
@@ -1009,11 +1018,12 @@
#endif /* ALTSTAT_SCREW_UP */

nsect = (rq->current_nr_sectors > msect) ? msect : rq->current_nr_sectors;
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);
DTF("Multiwrite: %p, nsect: %d , rq->current_nr_sectors: %ld\n",
pBuf, nsect, rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_output_data(drive, pBuf, nsect * SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors -= nsect;


Attachments:
(No filename) (978.00 B)
ide-map-1 (4.05 kB)
Download all attachments

2002-01-18 01:50:10

by Andre Hedrick

[permalink] [raw]
Subject: Re: DO NOT USE IT (Re: linux-2.5.3-pre1 and IDE Driver Trouble) FATAL


That problem is now fixed in 2.5.3-pre1-2 + arch_compatablity.patch


On Fri, 18 Jan 2002, Marc Lehmann wrote:

> On Wed, Jan 16, 2002 at 01:07:46PM -0800, Andre Hedrick <[email protected]> wrote:
> >
> > If the driver falls out of DMA, DEADBOX!!!!
> > There is a conflict of BIO and ACB and it is very fatal.
>
> As a matter of fact, this is not much different to 2.4 behaviour. hdparm
> -d1 on a busy disk kills the machine, with interrupts turned off (tested
> on all my machines (all SMP, btw), with linux-2.4.13-ac7, 2.4.17 and
> 2.4.17+ide-patch), on both my promise, piix and via controllers.
>
> Also, hdparm -w gives me:
>
> Jan 7 05:40:47 (none) kernel: bug: kernel timer added twice at c01cc2e9.
> Jan 7 05:40:54 (none) kernel: ide1: reset: success
>
> and then both hdc and hdd are dead, which is only for a short time after
> which the machine freezes (software watchdog doesn't help).
>
> (under 2.2, using hdparmn on the same hardware was safe, at least with
> respect to hdparm -d1).
>
> --
> -----==- |
> ----==-- _ |
> ---==---(_)__ __ ____ __ Marc Lehmann +--
> --==---/ / _ \/ // /\ \/ / [email protected] |e|
> -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
> The choice of a GNU generation |
> |
>

Andre Hedrick
Linux Disk Certification Project Linux ATA Development