mg_disk: fix dependency on libata
Subsystems (2)
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
@@ -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
Quoted 6 lines · Bartlomiej Zolnierkiewicz
Add local copies of
ata_id_string()andata_id_c_string()tomg_diskso there is no need for the driver to depend on ATA and SCSI.Cc unsik Kim <[email protected]>Cc Tejun Heo <[email protected]>Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
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
Quoted 8 lines · Tejun Heo
Quoted 6 lines · Bartlomiej Zolnierkiewicz
Add local copies of
ata_id_string()andata_id_c_string()tomg_diskso there is no need for the driver to depend on ATA and SCSI.Cc unsik Kim <[email protected]>Cc Tejun Heo <[email protected]>Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
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.
Acked-by Tejun Heo <[email protected]>
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
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_stringand 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
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_stringand 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
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()andata_id_c_string()tomg_diskso there is no need for the driver to depend on ATA and SCSI.Cc unsik Kim <[email protected]>Cc Tejun Heo <[email protected]>Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>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
Acked-by Tejun Heo <[email protected]>(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!
Quoted 10 lines · Bartlomiej Zolnierkiewicz
Add local copies of
ata_id_string()andata_id_c_string()tomg_diskso there is no need for the driver to depend on ATA and SCSI.Cc unsik Kim <[email protected]>Cc Tejun Heo <[email protected]>Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>--- 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
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()andata_id_c_string()tomg_diskso there is no need for the driver to depend on ATA and SCSI.Cc unsik Kim <[email protected]>Cc Tejun Heo <[email protected]>Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>--- 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... ;)