Skip to contentSkip to conversation

: Final ESP driver rewrite

PATCH In review David Miller 3 participants 7 messages Apr 27, 2007 – May 7, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Final ESP driver rewrite

This is the patch I intend to send to Linus via my sparc-2.6 tree.

Thanks to everyone for the review and testing!

commit cd9ad58d4061494e7fdd70ded7bcf2418daf356a

Author: David S. Miller <[email protected]>
Date:   Thu Apr 26 21:19:23 2007 -0700

[SCSI] SUNESP: Complete driver rewrite to version 2.0

Major features:

1) Tagged queuing support.
2) Will properly negotiate for synchronous transfers even on devices that reject the wide negotiation message, such as CDROMs
3) Significantly lower kernel stack usage in interrupt handler path by elimination of function vector arrays, replaced by a top-level switch statement state machine.
4) Uses generic scsi infrastructure as much as possible to avoid code duplication.
5) Automatic request of sense data in response to CHECK_CONDITION
6) Portable to other platforms using ESP such as DEC and Sun3 systems.

drivers/scsi/Kconfig +6 -0
index 4cd280e..fcc4cb6 100644
@@ -1763,9 +1763,15 @@ config SUN3X_ESP
 	  The ESP was an on-board SCSI controller used on Sun 3/80
 	  machines.  Say Y here to compile in support for it.
 
+config SCSI_ESP_CORE
+	tristate "ESP Scsi Driver Core"
+	depends on SCSI
+	select SCSI_SPI_ATTRS
+
 config SCSI_SUNESP
 	tristate "Sparc ESP Scsi Driver"
 	depends on SBUS && SCSI
+	select SCSI_ESP_CORE
 	help
 	  This is the driver for the Sun ESP SCSI host adapter. The ESP
 	  chipset is present in most SPARC SBUS-based computers.
drivers/scsi/Makefile +2 -1
index 79ecf4e..70cff4c 100644
@@ -106,7 +106,8 @@ obj-$(CONFIG_MEGARAID_LEGACY)	+= megaraid.o
 obj-$(CONFIG_MEGARAID_NEWGEN)	+= megaraid/
 obj-$(CONFIG_MEGARAID_SAS)	+= megaraid/
 obj-$(CONFIG_SCSI_ACARD)	+= atp870u.o
-obj-$(CONFIG_SCSI_SUNESP)	+= esp.o
+obj-$(CONFIG_SCSI_ESP_CORE)	+= esp_scsi.o
+obj-$(CONFIG_SCSI_SUNESP)	+= sun_esp.o
 obj-$(CONFIG_SCSI_GDTH)		+= gdth.o
 obj-$(CONFIG_SCSI_INITIO)	+= initio.o
 obj-$(CONFIG_SCSI_INIA100)	+= a100u2w.o
drivers/scsi/esp.c deleted +0 -4394

2,976 lines not on this page · raw message

drivers/scsi/esp.h deleted +0 -406

406 lines not on this page · raw message

drivers/scsi/esp_scsi.c new file +2710 -0

2,710 lines not on this page · raw message

drivers/scsi/esp_scsi.h new file +560 -0

560 lines not on this page · raw message

drivers/scsi/sun_esp.c new file +634 -0

634 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 8 lines · David Miller

This is the patch I intend to send to Linus via my sparc-2.6 tree.

Thanks to everyone for the review and testing!

commit cd9ad58d4061494e7fdd70ded7bcf2418daf356a

Author: David S. Miller <[email protected]>
Date:   Thu Apr 26 21:19:23 2007 -0700

Would not it be better to delete the file (à la svn rm first), then readd it?

Jan

Signature · 4 lines
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

From: Jan Engelhardt <[email protected]>
Date: Fri, 27 Apr 2007 09:57:34 +0200 (MEST)

Quoted 6 lines · David Miller
Quoted 4 lines

This is the patch I intend to send to Linus via my sparc-2.6 tree.

Quoted 7 lines
Quoted 5 lines

Thanks to everyone for the review and testing!

commit cd9ad58d4061494e7fdd70ded7bcf2418daf356a

Author: David S. Miller <[email protected]>
Date:   Thu Apr 26 21:19:23 2007 -0700

Would not it be better to delete the file (à la svn rm first), then readd it?

What I did in GIT was remove drivers/scsi/esp.[ch] then add drivers/scsi/esp_scsi.[ch] and drivers/scsi/sun_esp.c

And that is reflected exactly in the patch, so what's the suggestion?
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 11 lines · David Miller
Quoted 11 lines · David Miller
Quoted 9 lines

This is the patch I intend to send to Linus via my sparc-2.6 tree.

Thanks to everyone for the review and testing!

commit cd9ad58d4061494e7fdd70ded7bcf2418daf356a

Author: David S. Miller <[email protected]>
Date:   Thu Apr 26 21:19:23 2007 -0700
Quoted 7 lines
Quoted 1 line

Would not it be better to delete the file (à la svn rm first), then readd it?

What I did in GIT was remove drivers/scsi/esp.[ch] then add drivers/scsi/esp_scsi.[ch] and drivers/scsi/sun_esp.c

And that is reflected exactly in the patch, so what's the suggestion?

Well the patch looks like it's done in one commit (rather than two - delete+add), but that's probably just because it's the diff over both commits. All fine.

Jan

Signature · 4 lines
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

From: Jan Engelhardt <[email protected]>
Date: Fri, 27 Apr 2007 10:33:30 +0200 (MEST)

Quoted 2 lines

Well the patch looks like it's done in one commit (rather than two - delete+add), but that's probably just because it's the diff over both commits.

I didn't do it in multiple commits, I did it in one.

If I do it in two commits, the driver doesn't exist at a point in the history and this screws things up for people trying to bisect who have that hardware.

#5 lore raw
In reply to David Miller

Hello David,

Building this I got the following warnings from modpost:

WARNING: vmlinux - Section mismatch: reference to .init.text:esp_bootup_reset from .text between 'esp_eh_host_reset_handler' (at offset 0x108814) and 'esp_info'
WARNING: vmlinux - Section mismatch: reference to .init.text:scsi_esp_register from __ksymtab between '__ksymtab_scsi_esp_register' (at offset 0x2a20) and '__ksymtab_scsi_esp_intr'

Regarding the first one: esp_bootup_reset gets called from esp_eh_host_reset_handler, so it cannot be __devinit. The patch attached fixes this.

The second one is more tricky. From my understanding the ksymtab sections do not affect what modpost is checking here, so my guess is we should ignore that warning.

I've also attached the boot output I get, no problems with the code. Nice job!

Regards,
Martin Habets

---
esp: esp0, regs[fd016000:fd00f000] irq[36]
esp: esp0 is a FAS100A, 40 MHz (ccf=0), SCSI ID 7
scsi0 : esp
scsi 0:0:0:0: Sequential-Access Quantum DLT4000 DA97 PQ: 0 ANSI: 2
target0:0:0: Beginning Domain Validation
target0:0:0: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 15) target0:0:0: Domain Validation skipping write tests
target0:0:0: Ending Domain Validation
scsi 0:0:1:0: Direct-Access SEAGATE ST39173W SUN9.0G 7063 PQ: 0 ANSI: 2
target0:0:1: Beginning Domain Validation
target0:0:1: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 15) target0:0:1: Domain Validation skipping write tests
target0:0:1: Ending Domain Validation
scsi 0:0:3:0: Direct-Access SEAGATE ST32550W SUN2.1G 0416 PQ: 0 ANSI: 2
target0:0:3: Beginning Domain Validation
target0:0:3: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 15) target0:0:3: Domain Validation skipping write tests
target0:0:3: Ending Domain Validation
esp: esp0, regs[fd017000:fd011000] irq[53]
esp: esp0 is a FAS236, 40 MHz (ccf=0), SCSI ID 7
scsi1 : esp
SCSI device sda: 17689267 512-byte hdwr sectors (9057 MB)
sda: Write Protect is off
sda: Mode Sense: cf 00 10 08
SCSI device sda: write cache: disabled, read cache: enabled, supports DPO and FUA SCSI device sda: 17689267 512-byte hdwr sectors (9057 MB)
sda: Write Protect is off
sda: Mode Sense: cf 00 10 08
SCSI device sda: write cache: disabled, read cache: enabled, supports DPO and FUA
sda: sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8
sd 0:0:1:0: Attached scsi disk sda
SCSI device sdb: 4194995 512-byte hdwr sectors (2148 MB)
sdb: Write Protect is off
sdb: Mode Sense: ab 00 10 08
SCSI device sdb: write cache: disabled, read cache: enabled, supports DPO and FUA SCSI device sdb: 4194995 512-byte hdwr sectors (2148 MB)
sdb: Write Protect is off
sdb: Mode Sense: ab 00 10 08
SCSI device sdb: write cache: disabled, read cache: enabled, supports DPO and FUA
sdb: sdb1 sdb2 sdb3 sdb4 sdb5
sd 0:0:3:0: Attached scsi disk sdb

---
Index: linux/drivers/scsi/esp_scsi.c
=================================--- linux.orig/drivers/scsi/esp_scsi.c 2007-05-07 14:33:05.000000000 +0100
+++ linux/drivers/scsi/esp_scsi.c 2007-05-07 20:37:29.000000000 +0100
@@ -2211,7 +2211,7 @@
}

/* This places the ESP into a known state at boot time. */
-static void __devinit esp_bootup_reset(struct esp *esp) +static void esp_bootup_reset(struct esp *esp)
{
u8 val;

#6 lore raw
In reply to David Miller

From: Martin Habets <[email protected]>
Date: Mon, 7 May 2007 20:49:30 +0100

Quoted 10 lines

Hello David,

Building this I got the following warnings from modpost:

WARNING: vmlinux - Section mismatch: reference to .init.text:esp_bootup_reset from .text between 'esp_eh_host_reset_handler' (at offset 0x108814) and 'esp_info'
WARNING: vmlinux - Section mismatch: reference to .init.text:scsi_esp_register from __ksymtab between '__ksymtab_scsi_esp_register' (at offset 0x2a20) and '__ksymtab_scsi_esp_intr'

Regarding the first one: esp_bootup_reset gets called from esp_eh_host_reset_handler, so it cannot be __devinit. The patch attached fixes this.

Patch applied, thanks.