* [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name
@ 2011-09-08 16:26 Olaf Hering
2011-09-08 16:55 ` KY Srinivasan
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Olaf Hering @ 2011-09-08 16:26 UTC (permalink / raw)
To: K. Y. Srinivasan; +Cc: devel, gregkh, linux-kernel, virtualization
mkinitrd relies on /sys/class/scsi_host/*/proc_name instead of
/sys/block/sd*/device/../../../moalias to get the scsi driver module
name.
As a fallback the sysfs driver name could be used, which does not match
the module name either ('storvsc' vs. 'hv_storvsc').
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
drivers/staging/hv/storvsc_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -1333,7 +1333,8 @@ static DEF_SCSI_QCMD(storvsc_queuecomman
/* Scsi driver */
static struct scsi_host_template scsi_driver = {
.module = THIS_MODULE,
- .name = "storvsc_host_t",
+ .name = "hv_storvsc",
+ .proc_name = "hv_storvsc",
.bios_param = storvsc_get_chs,
.queuecommand = storvsc_queuecommand,
.eh_host_reset_handler = storvsc_host_reset_handler,
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name
2011-09-08 16:26 [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name Olaf Hering
@ 2011-09-08 16:55 ` KY Srinivasan
2011-09-08 19:12 ` Greg KH
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: KY Srinivasan @ 2011-09-08 16:55 UTC (permalink / raw)
To: Olaf Hering; +Cc: gregkh, linux-kernel, devel, virtualization
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1477 bytes --]
> -----Original Message-----
> From: Olaf Hering [mailto:olaf@aepfle.de]
> Sent: Thursday, September 08, 2011 12:27 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org
> Subject: [PATCH] Staging: hv: storvsc: Show the modulename in
> /sys/class/scsi_host/*/proc_name
>
>
> mkinitrd relies on /sys/class/scsi_host/*/proc_name instead of
> /sys/block/sd*/device/../../../moalias to get the scsi driver module
> name.
> As a fallback the sysfs driver name could be used, which does not match
> the module name either ('storvsc' vs. 'hv_storvsc').
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> ---
> drivers/staging/hv/storvsc_drv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- a/drivers/staging/hv/storvsc_drv.c
> +++ b/drivers/staging/hv/storvsc_drv.c
> @@ -1333,7 +1333,8 @@ static DEF_SCSI_QCMD(storvsc_queuecomman
> /* Scsi driver */
> static struct scsi_host_template scsi_driver = {
> .module = THIS_MODULE,
> - .name = "storvsc_host_t",
> + .name = "hv_storvsc",
> + .proc_name = "hv_storvsc",
> .bios_param = storvsc_get_chs,
> .queuecommand = storvsc_queuecommand,
> .eh_host_reset_handler = storvsc_host_reset_handler,
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name
@ 2011-09-08 16:55 ` KY Srinivasan
0 siblings, 0 replies; 9+ messages in thread
From: KY Srinivasan @ 2011-09-08 16:55 UTC (permalink / raw)
To: Olaf Hering; +Cc: devel, gregkh, linux-kernel, virtualization
> -----Original Message-----
> From: Olaf Hering [mailto:olaf@aepfle.de]
> Sent: Thursday, September 08, 2011 12:27 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org
> Subject: [PATCH] Staging: hv: storvsc: Show the modulename in
> /sys/class/scsi_host/*/proc_name
>
>
> mkinitrd relies on /sys/class/scsi_host/*/proc_name instead of
> /sys/block/sd*/device/../../../moalias to get the scsi driver module
> name.
> As a fallback the sysfs driver name could be used, which does not match
> the module name either ('storvsc' vs. 'hv_storvsc').
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> ---
> drivers/staging/hv/storvsc_drv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- a/drivers/staging/hv/storvsc_drv.c
> +++ b/drivers/staging/hv/storvsc_drv.c
> @@ -1333,7 +1333,8 @@ static DEF_SCSI_QCMD(storvsc_queuecomman
> /* Scsi driver */
> static struct scsi_host_template scsi_driver = {
> .module = THIS_MODULE,
> - .name = "storvsc_host_t",
> + .name = "hv_storvsc",
> + .proc_name = "hv_storvsc",
> .bios_param = storvsc_get_chs,
> .queuecommand = storvsc_queuecommand,
> .eh_host_reset_handler = storvsc_host_reset_handler,
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name
2011-09-08 16:26 [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name Olaf Hering
2011-09-08 16:55 ` KY Srinivasan
@ 2011-09-08 19:12 ` Greg KH
2011-09-09 8:45 ` Olaf Hering
2011-09-09 12:45 ` [PATCH] Staging: hv: storvsc: advertise hv_storvsc instead of storvsc as driver name Olaf Hering
2011-09-09 12:46 ` [PATCH] Staging: hv: netvsc: advertise hv_netvsc instead of netvsc " Olaf Hering
3 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2011-09-08 19:12 UTC (permalink / raw)
To: Olaf Hering; +Cc: K. Y. Srinivasan, linux-kernel, devel, virtualization
On Thu, Sep 08, 2011 at 06:26:50PM +0200, Olaf Hering wrote:
>
> mkinitrd relies on /sys/class/scsi_host/*/proc_name instead of
> /sys/block/sd*/device/../../../moalias to get the scsi driver module
> name.
> As a fallback the sysfs driver name could be used, which does not match
> the module name either ('storvsc' vs. 'hv_storvsc').
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> ---
> drivers/staging/hv/storvsc_drv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- a/drivers/staging/hv/storvsc_drv.c
> +++ b/drivers/staging/hv/storvsc_drv.c
> @@ -1333,7 +1333,8 @@ static DEF_SCSI_QCMD(storvsc_queuecomman
> /* Scsi driver */
> static struct scsi_host_template scsi_driver = {
> .module = THIS_MODULE,
> - .name = "storvsc_host_t",
> + .name = "hv_storvsc",
> + .proc_name = "hv_storvsc",
Shouldn't this be MODULE_NAME so it handles any potential name change in
the future and makes it a bit more obvious as to what is going on here?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name
2011-09-08 19:12 ` Greg KH
@ 2011-09-09 8:45 ` Olaf Hering
2011-09-09 15:24 ` Greg KH
0 siblings, 1 reply; 9+ messages in thread
From: Olaf Hering @ 2011-09-09 8:45 UTC (permalink / raw)
To: Greg KH; +Cc: K. Y. Srinivasan, linux-kernel, devel, virtualization
On Thu, Sep 08, Greg KH wrote:
> On Thu, Sep 08, 2011 at 06:26:50PM +0200, Olaf Hering wrote:
> > +++ b/drivers/staging/hv/storvsc_drv.c
> > @@ -1333,7 +1333,8 @@ static DEF_SCSI_QCMD(storvsc_queuecomman
> > /* Scsi driver */
> > static struct scsi_host_template scsi_driver = {
> > .module = THIS_MODULE,
> > - .name = "storvsc_host_t",
> > + .name = "hv_storvsc",
> > + .proc_name = "hv_storvsc",
>
> Shouldn't this be MODULE_NAME so it handles any potential name change in
> the future and makes it a bit more obvious as to what is going on here?
MODULE_NAME is just another define and appearently not used to assemble
a kernel module. Is DRV_NAME depreciated?
I think hv_storvsc and hv_netvsc should advertise their module names as
sysfs driver names. Digging into the hv history it could be that the
initial implementation had a storvsc.ko, and
c3260cfe8f08ca4564df61950cbebbb693aee292 introduced the hv_storvsc.ko
I will send a patch on top of that.
Olaf
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] Staging: hv: storvsc: advertise hv_storvsc instead of storvsc as driver name
2011-09-08 16:26 [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name Olaf Hering
2011-09-08 16:55 ` KY Srinivasan
2011-09-08 19:12 ` Greg KH
@ 2011-09-09 12:45 ` Olaf Hering
2011-09-09 15:25 ` Greg KH
2011-09-09 12:46 ` [PATCH] Staging: hv: netvsc: advertise hv_netvsc instead of netvsc " Olaf Hering
3 siblings, 1 reply; 9+ messages in thread
From: Olaf Hering @ 2011-09-09 12:45 UTC (permalink / raw)
To: K. Y. Srinivasan; +Cc: gregkh, linux-kernel, devel, virtualization
Signed-off-by: Olaf Hering <olaf@aepfle.de>
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -42,6 +42,8 @@
#include "hyperv.h"
+#define MODULE_NAME "hv_storvsc"
+
#define STORVSC_RING_BUFFER_SIZE (20*PAGE_SIZE)
static int storvsc_ringbuffer_size = STORVSC_RING_BUFFER_SIZE;
@@ -1164,7 +1166,7 @@ static void storvsc_command_completion(s
if (scmnd->result) {
if (scsi_normalize_sense(scmnd->sense_buffer,
SCSI_SENSE_BUFFERSIZE, &sense_hdr))
- scsi_print_sense_hdr("storvsc", &sense_hdr);
+ scsi_print_sense_hdr(MODULE_NAME, &sense_hdr);
}
scsi_set_resid(scmnd,
@@ -1333,8 +1335,8 @@ static DEF_SCSI_QCMD(storvsc_queuecomman
/* Scsi driver */
static struct scsi_host_template scsi_driver = {
.module = THIS_MODULE,
- .name = "hv_storvsc",
- .proc_name = "hv_storvsc",
+ .name = MODULE_NAME,
+ .proc_name = MODULE_NAME,
.bios_param = storvsc_get_chs,
.queuecommand = storvsc_queuecommand,
.eh_host_reset_handler = storvsc_host_reset_handler,
@@ -1468,7 +1470,7 @@ err_out:
/* The one and only one */
static struct hv_driver storvsc_drv = {
- .name = "storvsc",
+ .name = MODULE_NAME,
.id_table = id_table,
.probe = storvsc_probe,
.remove = storvsc_remove,
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] Staging: hv: netvsc: advertise hv_netvsc instead of netvsc as driver name
2011-09-08 16:26 [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name Olaf Hering
` (2 preceding siblings ...)
2011-09-09 12:45 ` [PATCH] Staging: hv: storvsc: advertise hv_storvsc instead of storvsc as driver name Olaf Hering
@ 2011-09-09 12:46 ` Olaf Hering
3 siblings, 0 replies; 9+ messages in thread
From: Olaf Hering @ 2011-09-09 12:46 UTC (permalink / raw)
To: K. Y. Srinivasan; +Cc: gregkh, linux-kernel, devel, virtualization
Signed-off-by: Olaf Hering <olaf@aepfle.de>
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -41,6 +41,8 @@
#include "hyperv.h"
#include "hyperv_net.h"
+#define MODULE_NAME "hv_netvsc"
+
struct net_device_context {
/* point back to our device context */
struct hv_device *device_ctx;
@@ -291,7 +293,7 @@ int netvsc_recv_callback(struct hv_devic
static void netvsc_get_drvinfo(struct net_device *net,
struct ethtool_drvinfo *info)
{
- strcpy(info->driver, "hv_netvsc");
+ strcpy(info->driver, MODULE_NAME);
strcpy(info->version, HV_DRV_VERSION);
strcpy(info->fw_version, "N/A");
}
@@ -420,7 +422,7 @@ MODULE_DEVICE_TABLE(vmbus, id_table);
/* The one and only one */
static struct hv_driver netvsc_drv = {
- .name = "netvsc",
+ .name = MODULE_NAME,
.id_table = id_table,
.probe = netvsc_probe,
.remove = netvsc_remove,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name
2011-09-09 8:45 ` Olaf Hering
@ 2011-09-09 15:24 ` Greg KH
0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2011-09-09 15:24 UTC (permalink / raw)
To: Olaf Hering; +Cc: K. Y. Srinivasan, linux-kernel, devel, virtualization
On Fri, Sep 09, 2011 at 10:45:23AM +0200, Olaf Hering wrote:
> On Thu, Sep 08, Greg KH wrote:
>
> > On Thu, Sep 08, 2011 at 06:26:50PM +0200, Olaf Hering wrote:
>
> > > +++ b/drivers/staging/hv/storvsc_drv.c
> > > @@ -1333,7 +1333,8 @@ static DEF_SCSI_QCMD(storvsc_queuecomman
> > > /* Scsi driver */
> > > static struct scsi_host_template scsi_driver = {
> > > .module = THIS_MODULE,
> > > - .name = "storvsc_host_t",
> > > + .name = "hv_storvsc",
> > > + .proc_name = "hv_storvsc",
> >
> > Shouldn't this be MODULE_NAME so it handles any potential name change in
> > the future and makes it a bit more obvious as to what is going on here?
>
> MODULE_NAME is just another define and appearently not used to assemble
> a kernel module. Is DRV_NAME depreciated?
Sorry, I should have said KBUILD_MODNAME, that will give you what you
want here.
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Staging: hv: storvsc: advertise hv_storvsc instead of storvsc as driver name
2011-09-09 12:45 ` [PATCH] Staging: hv: storvsc: advertise hv_storvsc instead of storvsc as driver name Olaf Hering
@ 2011-09-09 15:25 ` Greg KH
0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2011-09-09 15:25 UTC (permalink / raw)
To: Olaf Hering; +Cc: K. Y. Srinivasan, linux-kernel, devel, virtualization
On Fri, Sep 09, 2011 at 02:45:33PM +0200, Olaf Hering wrote:
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> --- a/drivers/staging/hv/storvsc_drv.c
> +++ b/drivers/staging/hv/storvsc_drv.c
> @@ -42,6 +42,8 @@
>
> #include "hyperv.h"
>
> +#define MODULE_NAME "hv_storvsc"
No, just use KBUILD_MODNAME, it's already there and correct. Care to
fix this one, and your other patch, to use it instead?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-09-09 15:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08 16:26 [PATCH] Staging: hv: storvsc: Show the modulename in /sys/class/scsi_host/*/proc_name Olaf Hering
2011-09-08 16:55 ` KY Srinivasan
2011-09-08 16:55 ` KY Srinivasan
2011-09-08 19:12 ` Greg KH
2011-09-09 8:45 ` Olaf Hering
2011-09-09 15:24 ` Greg KH
2011-09-09 12:45 ` [PATCH] Staging: hv: storvsc: advertise hv_storvsc instead of storvsc as driver name Olaf Hering
2011-09-09 15:25 ` Greg KH
2011-09-09 12:46 ` [PATCH] Staging: hv: netvsc: advertise hv_netvsc instead of netvsc " Olaf Hering
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.