Skip to contentSkip to conversation

jazz_esp converted to use esp_core

PATCH In review Thomas Bogendoerfer 4 participants 7 messages May 21, 2007 – May 22, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jazz_esp converted to use esp_core

Hi,

after chasing and fixing two jazz platform bugs and one MIPS dma mapping bug, I finally succeeded in using the Dave's new esp_core (great work, thank you Dave). Below is the patch.

Thomas.

Use new SCCI_ESP_CORE for JAZZ SCSS host adapter driver

---

drivers/scsi/Kconfig +1 -0
index d28c14e..62d62ab 100644
@@ -1532,6 +1532,7 @@ source "drivers/scsi/arm/Kconfig"
 config JAZZ_ESP
 	bool "MIPS JAZZ FAS216 SCSI support"
 	depends on MACH_JAZZ && SCSI
+	select SCSI_ESP_CORE
 	help
 	  This is the driver for the onboard SCSI host adapter of MIPS Magnum
 	  4000, Acer PICA, Olivetti M700-10 and a few other identical OEM
drivers/scsi/Makefile +1 -1
index 51e884f..b348600 100644
@@ -121,7 +121,7 @@ obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o
 obj-$(CONFIG_SCSI_3W_9XXX)	+= 3w-9xxx.o
 obj-$(CONFIG_SCSI_PPA)		+= ppa.o
 obj-$(CONFIG_SCSI_IMM)		+= imm.o
-obj-$(CONFIG_JAZZ_ESP)		+= NCR53C9x.o	jazz_esp.o
+obj-$(CONFIG_JAZZ_ESP)		+= jazz_esp.o
 obj-$(CONFIG_SUN3X_ESP)		+= NCR53C9x.o	sun3x_esp.o
 obj-$(CONFIG_SCSI_FCAL)		+= fcal.o
 obj-$(CONFIG_SCSI_LASI700)	+= 53c700.o lasi700.o
drivers/scsi/jazz_esp.c +207 -237

514 lines not on this page · raw message

Signature · 6 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 5 lines · Thomas Bogendoerfer

Hi,

after chasing and fixing two jazz platform bugs and one MIPS dma mapping bug, I finally succeeded in using the Dave's new esp_core (great work, thank you Dave). Below is the patch.

Very nice driver. The only thing that confused me a little are the various helper functions split out of esp_jazz_probe that make the code a bit odd to read. Are these intentional or a carry over from the previous driver?

drivers/scsi/Makefile obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o · line 124

Quoted 8 lines
drivers/scsi/Makefile +1 -1
@@ -121,7 +121,7 @@ obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o
 obj-$(CONFIG_SCSI_3W_9XXX)	+= 3w-9xxx.o
 obj-$(CONFIG_SCSI_PPA)		+= ppa.o
 obj-$(CONFIG_SCSI_IMM)		+= imm.o
-obj-$(CONFIG_JAZZ_ESP)		+= NCR53C9x.o	jazz_esp.o
+obj-$(CONFIG_JAZZ_ESP)		+= jazz_esp.o

Note to Dave: it probably would be nice to just build esp_scsi.o from the makefile like the old NCR53C9x drivers did instead of the Kconfig hackery, what do you think?

#2 lore raw
Quoted 3 lines · Christoph Hellwig

Note to Dave: it probably would be nice to just build esp_scsi.o from the makefile like the old NCR53C9x drivers did instead of the Kconfig hackery, what do you think?

If the dependent drivers reside in the same directory, Makefile hackery is definitely preferred.

That's what libata did until things got complicated, and it worked well.

Jeff

#3 lore raw
In reply to Christoph Hellwig

From: Christoph Hellwig <[email protected]>
Date: Tue, 22 May 2007 00:00:41 +0100

Quoted 4 lines
Quoted 4 lines
drivers/scsi/Makefile +0 -0
@@ -121,7 +121,7 @@ obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o
 obj-$(CONFIG_SCSI_3W_9XXX)	+= 3w-9xxx.o
Quoted 8 lines

drivers/scsi/Makefile obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o · line 124

Quoted 4 lines
drivers/scsi/Makefile +1 -1
 obj-$(CONFIG_SCSI_PPA)		+= ppa.o
 obj-$(CONFIG_SCSI_IMM)		+= imm.o
-obj-$(CONFIG_JAZZ_ESP)		+= NCR53C9x.o	jazz_esp.o
+obj-$(CONFIG_JAZZ_ESP)		+= jazz_esp.o

Note to Dave: it probably would be nice to just build esp_scsi.o from the makefile like the old NCR53C9x drivers did instead of the Kconfig hackery, what do you think?

I disagree, I want people to be able to do test builds even if their platform lacks a front-end driver. And for platforms with multiple front ends it's a complete waste of space.

#4 lore raw
Quoted 4 lines · David Miller

I disagree, I want people to be able to do test builds even if their platform lacks a front-end driver. And for platforms with multiple front ends it's a complete waste of space.

Where is the waste of space?

If done properly, Makefile dependencies include precisely what is required by the LLDD, no more no less.

Jeff

#5 lore raw

From: Jeff Garzik <[email protected]>
Date: Mon, 21 May 2007 19:45:22 -0400

Quoted 11 lines
Quoted 4 lines · David Miller

I disagree, I want people to be able to do test builds even if their platform lacks a front-end driver. And for platforms with multiple front ends it's a complete waste of space.

Where is the waste of space?

If done properly, Makefile dependencies include precisely what is required by the LLDD, no more no less.

I see what you're saying, I misunderstood how this stuff works, this sounds like a good idea.

#6 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig
Quoted 3 lines · Thomas Bogendoerfer

after chasing and fixing two jazz platform bugs and one MIPS dma mapping bug, I finally succeeded in using the Dave's new esp_core (great work, thank you Dave). Below is the patch.

Very nice driver. The only thing that confused me a little are the various helper functions split out of esp_jazz_probe that make the code a bit odd to read. Are these intentional or a carry over from the previous driver?

the sparc frontend used them, because most of these helper are checking for prom properties, which the jazz doesn't have. I've changed that and folded those little helpers into the probe function. I'll send a new patch a couple of minutes.

Quoted 4 lines
Quoted 4 lines
drivers/scsi/Makefile +0 -0
@@ -121,7 +121,7 @@ obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o
 obj-$(CONFIG_SCSI_3W_9XXX)	+= 3w-9xxx.o
Quoted 8 lines

drivers/scsi/Makefile obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o · line 124

Quoted 4 lines
drivers/scsi/Makefile +1 -1
 obj-$(CONFIG_SCSI_PPA)		+= ppa.o
 obj-$(CONFIG_SCSI_IMM)		+= imm.o
-obj-$(CONFIG_JAZZ_ESP)		+= NCR53C9x.o	jazz_esp.o
+obj-$(CONFIG_JAZZ_ESP)		+= jazz_esp.o

Note to Dave: it probably would be nice to just build esp_scsi.o from the makefile like the old NCR53C9x drivers did instead of the Kconfig hackery, what do you think?

after seeing no objection to using esp_scsi.o like NCR53C9x.o, I also changed that.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]