Skip to contentSkip to conversation

ata-scsi driver update

DISCUSSION Jeff Garzik 2 participants 7 messages Jun 30, 2003 – Jul 2, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

maintenance update, nothing terribly new or exciting. mostly error handling improvements and cleanups (and some bug fixes just for fun).

GNU diff, versus 2.4.21 release:
ftp://ftp.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.4/2.4.21-atascsi1.patch.bz2

BK repos:
bk://kernel.bkbits.net/jgarzik/atascsi-2.[45]

The 2.5 repo is a bit out of date WRT the latest scsi api, but the ata-scsi driver itself is 100% in sync with its 2.4 counterpart. (due to the large number of changes in 2.5 scsi, the 2.5 driver is a fork of the 2.4 driver)

detailed changes:
* add autogenerated docbook docs
* add atapi (ifdef'd out, due to lack of err handling)
* better ata probing, including better err handling during probe
* more piix pci ids. bump up ich5 sata max speed to udma6.
* beginnings of SYNCHRONIZE CACHE support for ATA drives
* better SCSI emulation for ATA drives
* cleanups, simplifications, minor bug fixes
* a huge search-n-replace job, s/ata_host/ata_port/

A couple new host drivers coming next, along with atapi error handling...

#1 lore raw

Hi,

I've just tried your patch. Compiling fails at make dep:

mv /usr/src/linux-2.4.21/include/linux/modules/scsi_syms.ver.tmp /usr/src/linux-2.4.21/include/linux/modules/scsi_syms.ver gcc -D__KERNEL__ -I/usr/src/linux-2.4.21/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -E -D__GENKSYMS__ 53c700.c
| /sbin/genksyms -k 2.4.21 > /usr/src/linux-2.4.21/include/linux/modules/53c700.ver.tmp In file included from 53c700.c:142:
53c700.h:40:2: #error "Config.in must define either CONFIG_53C700_IO_MAPPED or CONFIG_53C700_MEM_MAPPED to use this scsi core."
53c700.c:163:22: 53c700_d.h: No such file or directory
mv /usr/src/linux-2.4.21/include/linux/modules/53c700.ver.tmp /usr/src/linux-2.4.21/include/linux/modules/53c700.ver make[4]: *** No rule to make target libata.c', needed by /usr/src/linux-2.4.21/include/linux/modules/libata.ver'. Stop. make[4]: Leaving directory `/usr/src/linux-2.4.21/drivers/scsi' make[3]: *** [_sfdep_scsi] Error 2
make[3]: Leaving directory `/usr/src/linux-2.4.21/drivers' make[2]: *** [fastdep] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.21/drivers' make[1]: *** [_sfdep_drivers] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.21'
make: *** [dep-files] Error 2

Under SCSI low-level drivers only ATA support and Intel PIIX/ICH support are selected.

This is with a freshly installed and patched 2.4.21.

Greetings,

Jurgen

#2 lore raw
Quoted 11 lines · Jurgen Kramer

Hi,

I've just tried your patch. Compiling fails at make dep:

make[4]: *** No rule to make target libata.c', needed by /usr/src/linux-2.4.21/include/linux/modules/libata.ver'. Stop.

Under SCSI low-level drivers only ATA support and Intel PIIX/ICH support are selected.

This is with a freshly installed and patched 2.4.21.

hmmm. did you run a "make mrproper" or "make distclean" before building? The above is a symptom of stale dependencies, not really any kernel patch.

Just to be sure, though, I just tried building from a fresh 2.4.21 tarball + my patch, with modversions enabled, and it worked.

Jeff

#3 lore raw
Quoted 3 lines · Jeff Garzik

hmmm. did you run a "make mrproper" or "make distclean" before building? The above is a symptom of stale dependencies, not really any kernel patch.

Ok I got it. I always get confused with directory names a and b in patches..;-) Compiling now. (BTW what is the proper way to apply such patches?)

Cheers,

Jurgen

#4 lore raw
Quoted 9 lines · Jurgen Kramer
Quoted 1 line · Jeff Garzik

hmmm. did you run a "make mrproper" or "make distclean" before building? The above is a symptom of stale dependencies, not really any kernel patch.

Ok I got it. I always get confused with directory names a and b in patches..;-) Compiling now. (BTW what is the proper way to apply such patches?)

Usually:

	cd <toplevel kernel directory>
	bzcat ../foo.patch.bz2 | patch -sp1

There is also scripts/patch-kernel script that you may play with.

Jeff

#5 lore raw

Ok it looks good:

ata_piix version 0.91
PCI: Enabling device 00:1f.1 (0005 -> 0007)
PCI: Setting latency timer of device 00:1f.1 to 64
PCI: Setting latency timer of device 00:1f.2 to 64
ata1: PATA max UDMA/33 cmd 0x1F0 ctl 0x3F6 bmdma 0xFC00 irq 14
ata1: unhandled bus state 0
ata1: dev 0 cfg 49:2f00 82:346b 83:7f01 84:4003 85:3469 86:3c01 87:4003 88:203f
ata1: dev 0 ATA, max UDMA/100, 234441648 sectors
ata1: dev 0 configured for UDMA/33
ata2: PATA max UDMA/33 cmd 0x170 ctl 0x376 bmdma 0xFC08 irq 15
ata2: unhandled bus state 0
ata2: dev 0 cfg 49:0f00 82:0218 83:4000 84:4000 85:0218 86:0000 87:4000 88:041f
ata2: dev 0 ATAPI, max UDMA/66
ata2: dev 0 configured for UDMA/33
ata3: SATA max UDMA/133 cmd 0xEFE0 ctl 0xEFAE bmdma 0xEF90 irq 18
ata4: SATA max UDMA/133 cmd 0xEFA0 ctl 0xEFAA bmdma 0xEF98 irq 18
ata3: dev 0 cfg 49:2f00 82:346b 83:7d01 84:4003 85:3469 86:3c01 87:4003 88:207f
ata3: dev 0 ATA, max UDMA/133, 234441648 sectors
ata3: dev 0 configured for UDMA/133
ata4: thread exiting
scsi0 : ata_piix
scsi1 : ata_piix
scsi2 : ata_piix
scsi3 : ata_piix

  Vendor: ATA       Model: WDC WD1200JB-00E  Rev: 0.60
  Type:   Direct-Access                      ANSI SCSI revision: 05
  Vendor: ATA       Model: ST3120026AS       Rev: 0.60
  Type:   Direct-Access                      ANSI SCSI revision: 05

libata version 0.60 loaded.
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0 SCSI device sda: 234441648 512-byte hdwr sectors (120034 MB) Partition check:
sda: sda1 sda2 sda3 sda4 < sda5 >
SCSI device sdb: 234441648 512-byte hdwr sectors (120034 MB)
sdb: sdb1 sdb2

Only my DVD-ROM doesn't show here. It should be on scsi1 (or is ATAPI support not in yet?) What also shows is that ata1 is not being configured for maximum possible speed. Ata1 should be set to UDMA/100. The SATA drive is configured properly though.

Cheers,

Jurgen

#6 lore raw
Quoted 2 lines · Jurgen Kramer

Only my DVD-ROM doesn't show here. It should be on scsi1 (or is ATAPI support not in yet?)

Correct, ATAPI isn't supported yet.

Quoted 2 lines

What also shows is that ata1 is not being
configured for maximum possible speed. Ata1 should be set to UDMA/100.

Correct. For PATA, the code does not yet do 40/80-conductor cable detection. Without that detection, it's not safe to drive a PATA device faster than UDMA/33.

Quoted 1 line

The SATA drive is configured properly though.

Yeah, SATA doesn't need to worry about PATA cable detection issues :)

Both ATAPI and PATA cable detection should be working in the next release (a week or two from now).

Jeff