Skip to contentSkip to conversation

mg_disk: fix dependency on libata

PATCH In review Bartlomiej Zolnierkiewicz 3 participants 8 messages Apr 25, 2009 – Apr 26, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 mg_disk: fix dependency on libata

Add local copies of ata_id_string() and ata_id_c_string() to mg_disk so there is no need for the driver to depend on ATA and SCSI.

---
 drivers/block/Kconfig   |    2 +-
 drivers/block/mg_disk.c |   44 ++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 41 insertions(+), 5 deletions(-)
drivers/block/Kconfig +1 -1
Index: b/drivers/block/Kconfig
===================================================================
@@ -412,7 +412,7 @@ config ATA_OVER_ETH
 
 config MG_DISK
 	tristate "mGine mflash, gflash support"
-	depends on ARM && ATA && GPIOLIB
+	depends on ARM && GPIOLIB
 	help
 	  mGine mFlash(gFlash) block device driver
 
drivers/block/mg_disk.c +40 -4

62 lines not on this page · raw message

Acked-by on v1 2/3
#1 lore raw
Quoted 6 lines · Bartlomiej Zolnierkiewicz

Add local copies of ata_id_string() and ata_id_c_string() to mg_disk so there is no need for the driver to depend on ATA and SCSI.

Ah.. right, that's a rather large dependency to pull in just for the string functions. Yeah, I think it would be better to keep local copy at elast for now.

(Continuing from the previous message :-) or do you want me to fold these patches into my series and push them through Jens with other patches?

Thanks.

Signature · 1 line
tejun
#2 lore raw
Quoted 8 lines · Tejun Heo
Quoted 6 lines · Bartlomiej Zolnierkiewicz

Add local copies of ata_id_string() and ata_id_c_string() to mg_disk so there is no need for the driver to depend on ATA and SCSI.

Quoted 5 lines

Ah.. right, that's a rather large dependency to pull in just for the string functions. Yeah, I think it would be better to keep local copy at elast for now.

Actually... NVMHCI[1] uses the same style of id string extraction, even though its command set is wholly new and unrelated to ATA. I copied into drivers/block/nvmhci.c[2] id_string, id_c_string and another useful, generic routine: ata_wait_register.

So, once nvmhci goes upstream, that will be a third copy... nvmhci still has rough edges, but it's mainly waiting on hardware "it works" verification at this point.

Jeff

[1] http://download.intel.com/standards/nvmhci/spec.pdf

[2] 'nvmhci' branch of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6.git

#3 lore raw
Quoted 8 lines · Jeff Garzik

Actually... NVMHCI[1] uses the same style of id string extraction, even though its command set is wholly new and unrelated to ATA. I copied into drivers/block/nvmhci.c[2] id_string, id_c_string and another useful, generic routine: ata_wait_register.

So, once nvmhci goes upstream, that will be a third copy... nvmhci still has rough edges, but it's mainly waiting on hardware "it works" verification at this point.

For two copies, copying seems to be the right way to go. For many more copies, making a library function is. Three is a difficult number. Maybe just make these inline functions for now?

Thanks.

Signature · 1 line
tejun
#4 lore raw
Quoted 6 lines · Tejun Heo
Quoted 5 lines · Jeff Garzik

Actually... NVMHCI[1] uses the same style of id string extraction, even though its command set is wholly new and unrelated to ATA. I copied into drivers/block/nvmhci.c[2] id_string, id_c_string and another useful, generic routine: ata_wait_register.

Quoted 7 lines
Quoted 3 lines

So, once nvmhci goes upstream, that will be a third copy... nvmhci still has rough edges, but it's mainly waiting on hardware "it works" verification at this point.

For two copies, copying seems to be the right way to go. For many more copies, making a library function is. Three is a difficult number. Maybe just make these inline functions for now?

<shrug> I'm just adding some data, I don't have a good suggestion :)

The functions do not change very often, so three copies is not necessarily the end of the world.

Jeff

#5 lore raw
In reply to Tejun Heo
Quoted 12 lines · On Sunday 26 April 2009 05:48:36 Tejun Heo wrote:
Quoted 6 lines · Bartlomiej Zolnierkiewicz

Add local copies of ata_id_string() and ata_id_c_string() to mg_disk so there is no need for the driver to depend on ATA and SCSI.

Ah.. right, that's a rather large dependency to pull in just for the string functions. Yeah, I think it would be better to keep local copy at elast for now.

Quoted 5 lines

(Continuing from the previous message :-) or do you want me to fold these patches into my series and push them through Jens with other patches?

Please include them in your series if possible. Thanks!

#6 lore raw
In reply to Bartlomiej Zolnierkiewicz
Quoted 10 lines · Bartlomiej Zolnierkiewicz

Add local copies of ata_id_string() and ata_id_c_string() to mg_disk so there is no need for the driver to depend on ATA and SCSI.

---
 drivers/block/Kconfig   |    2 +-
 drivers/block/mg_disk.c |   44 ++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 41 insertions(+), 5 deletions(-)

Please CC these types of patches to linux-ide also, as it is of interest to Linux ATA folks... thanks.

Jeff

#7 lore raw
Quoted 12 lines · On Sunday 26 April 2009 06:04:31 Jeff Garzik wrote:
Quoted 10 lines · Bartlomiej Zolnierkiewicz

Add local copies of ata_id_string() and ata_id_c_string() to mg_disk so there is no need for the driver to depend on ATA and SCSI.

---
 drivers/block/Kconfig   |    2 +-
 drivers/block/mg_disk.c |   44 ++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 41 insertions(+), 5 deletions(-)
Quoted 2 lines

Please CC these types of patches to linux-ide also, as it is of interest to Linux ATA folks... thanks.

Aye, aye. I usually do... ;)