* [PATCH 1/3] ibmvscsi: make parameters max_id and max_channel read-only
@ 2015-11-03 14:33 Laurent Vivier
2015-11-03 14:33 ` [PATCH 2/3] ibmvscsi: display default value for max_id, max_lun and max_channel Laurent Vivier
2015-11-03 14:33 ` [PATCH 3/3] ibmvscsi: Allow to configure maximum LUN Laurent Vivier
0 siblings, 2 replies; 4+ messages in thread
From: Laurent Vivier @ 2015-11-03 14:33 UTC (permalink / raw)
To: martin.petersen; +Cc: brking, tyreld, linux-scsi, linux-kernel, lvivier
The value of the parameter is never re-read by the driver,
so a new value is ignored. Let know the user he
can't modify it by removing writable attribute.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
drivers/scsi/ibmvscsi/ibmvscsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 6a41c36..3e76490 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -105,9 +105,9 @@ MODULE_AUTHOR("Dave Boutcher");
MODULE_LICENSE("GPL");
MODULE_VERSION(IBMVSCSI_VERSION);
-module_param_named(max_id, max_id, int, S_IRUGO | S_IWUSR);
+module_param_named(max_id, max_id, int, S_IRUGO);
MODULE_PARM_DESC(max_id, "Largest ID value for each channel");
-module_param_named(max_channel, max_channel, int, S_IRUGO | S_IWUSR);
+module_param_named(max_channel, max_channel, int, S_IRUGO);
MODULE_PARM_DESC(max_channel, "Largest channel value");
module_param_named(init_timeout, init_timeout, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(init_timeout, "Initialization timeout in seconds");
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] ibmvscsi: display default value for max_id, max_lun and max_channel.
2015-11-03 14:33 [PATCH 1/3] ibmvscsi: make parameters max_id and max_channel read-only Laurent Vivier
@ 2015-11-03 14:33 ` Laurent Vivier
2015-11-03 15:58 ` kbuild test robot
2015-11-03 14:33 ` [PATCH 3/3] ibmvscsi: Allow to configure maximum LUN Laurent Vivier
1 sibling, 1 reply; 4+ messages in thread
From: Laurent Vivier @ 2015-11-03 14:33 UTC (permalink / raw)
To: martin.petersen; +Cc: brking, tyreld, linux-scsi, linux-kernel, lvivier
As devices with values greater than that are silently ignored,
this gives some hints to the sys admin to know why he doesn't see
his devices...
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
drivers/scsi/ibmvscsi/ibmvscsi.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 3e76490..f9d7ec4 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -106,9 +106,9 @@ MODULE_LICENSE("GPL");
MODULE_VERSION(IBMVSCSI_VERSION);
module_param_named(max_id, max_id, int, S_IRUGO);
-MODULE_PARM_DESC(max_id, "Largest ID value for each channel");
+MODULE_PARM_DESC(max_id, "Largest ID value for each channel [Default=64]");
module_param_named(max_channel, max_channel, int, S_IRUGO);
-MODULE_PARM_DESC(max_channel, "Largest channel value");
+MODULE_PARM_DESC(max_channel, "Largest channel value [Default=3]");
module_param_named(init_timeout, init_timeout, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(init_timeout, "Initialization timeout in seconds");
module_param_named(max_requests, max_requests, int, S_IRUGO);
@@ -2294,6 +2294,10 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
host->max_channel = max_channel;
host->max_cmd_len = 16;
+ dev_info(dev,
+ "Maximum ID: %d Maximum LUN: %d Maximum Channel: %d\n",
+ host->max_id, host->max_lun, host->max_channel);
+
if (scsi_add_host(hostdata->host, hostdata->dev))
goto add_host_failed;
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] ibmvscsi: Allow to configure maximum LUN
2015-11-03 14:33 [PATCH 1/3] ibmvscsi: make parameters max_id and max_channel read-only Laurent Vivier
2015-11-03 14:33 ` [PATCH 2/3] ibmvscsi: display default value for max_id, max_lun and max_channel Laurent Vivier
@ 2015-11-03 14:33 ` Laurent Vivier
1 sibling, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2015-11-03 14:33 UTC (permalink / raw)
To: martin.petersen; +Cc: brking, tyreld, linux-scsi, linux-kernel, lvivier
QEMU allows until 32 LUNs.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
drivers/scsi/ibmvscsi/ibmvscsi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index f9d7ec4..e5478b0 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -84,6 +84,7 @@
*/
static int max_id = 64;
static int max_channel = 3;
+static int max_lun = 8;
static int init_timeout = 300;
static int login_timeout = 60;
static int info_timeout = 30;
@@ -117,6 +118,8 @@ module_param_named(fast_fail, fast_fail, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(fast_fail, "Enable fast fail. [Default=1]");
module_param_named(client_reserve, client_reserve, int, S_IRUGO );
MODULE_PARM_DESC(client_reserve, "Attempt client managed reserve/release");
+module_param(max_lun, int, S_IRUGO);
+MODULE_PARM_DESC(max_lun, "Maximum LUN value [Default=8]");
static void ibmvscsi_handle_crq(struct viosrp_crq *crq,
struct ibmvscsi_host_data *hostdata);
@@ -2289,7 +2292,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
goto init_pool_failed;
}
- host->max_lun = 8;
+ host->max_lun = max_lun;
host->max_id = max_id;
host->max_channel = max_channel;
host->max_cmd_len = 16;
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3] ibmvscsi: display default value for max_id, max_lun and max_channel.
2015-11-03 14:33 ` [PATCH 2/3] ibmvscsi: display default value for max_id, max_lun and max_channel Laurent Vivier
@ 2015-11-03 15:58 ` kbuild test robot
0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2015-11-03 15:58 UTC (permalink / raw)
To: Laurent Vivier
Cc: kbuild-all, martin.petersen, brking, tyreld, linux-scsi,
linux-kernel, lvivier
[-- Attachment #1: Type: text/plain, Size: 2535 bytes --]
Hi Laurent,
[auto build test WARNING on scsi/for-next]
[also WARNING on: v4.3 next-20151103]
url: https://github.com/0day-ci/linux/commits/Laurent-Vivier/ibmvscsi-make-parameters-max_id-and-max_channel-read-only/20151103-223706
base: https://github.com/0day-ci/linux Laurent-Vivier/ibmvscsi-make-parameters-max_id-and-max_channel-read-only/20151103-223706
config: powerpc-defconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All warnings (new ones prefixed by >>):
In file included from include/linux/dma-mapping.h:5:0,
from drivers/scsi/ibmvscsi/ibmvscsi.c:65:
drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_probe':
>> drivers/scsi/ibmvscsi/ibmvscsi.c:2298:4: warning: format '%d' expects argument of type 'int', but argument 4 has type 'u64 {aka long long unsigned int}' [-Wformat=]
"Maximum ID: %d Maximum LUN: %d Maximum Channel: %d\n",
^
include/linux/device.h:1166:51: note: in definition of macro 'dev_info'
#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
^
vim +2298 drivers/scsi/ibmvscsi/ibmvscsi.c
2282 rc = ibmvscsi_init_crq_queue(&hostdata->queue, hostdata, max_events);
2283 if (rc != 0 && rc != H_RESOURCE) {
2284 dev_err(&vdev->dev, "couldn't initialize crq. rc=%d\n", rc);
2285 goto kill_kthread;
2286 }
2287 if (initialize_event_pool(&hostdata->pool, max_events, hostdata) != 0) {
2288 dev_err(&vdev->dev, "couldn't initialize event pool\n");
2289 goto init_pool_failed;
2290 }
2291
2292 host->max_lun = 8;
2293 host->max_id = max_id;
2294 host->max_channel = max_channel;
2295 host->max_cmd_len = 16;
2296
2297 dev_info(dev,
> 2298 "Maximum ID: %d Maximum LUN: %d Maximum Channel: %d\n",
2299 host->max_id, host->max_lun, host->max_channel);
2300
2301 if (scsi_add_host(hostdata->host, hostdata->dev))
2302 goto add_host_failed;
2303
2304 /* we don't have a proper target_port_id so let's use the fake one */
2305 memcpy(ids.port_id, hostdata->madapter_info.partition_name,
2306 sizeof(ids.port_id));
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 21514 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-03 15:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-03 14:33 [PATCH 1/3] ibmvscsi: make parameters max_id and max_channel read-only Laurent Vivier
2015-11-03 14:33 ` [PATCH 2/3] ibmvscsi: display default value for max_id, max_lun and max_channel Laurent Vivier
2015-11-03 15:58 ` kbuild test robot
2015-11-03 14:33 ` [PATCH 3/3] ibmvscsi: Allow to configure maximum LUN Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).