search for: shost_gendev

Displaying 12 results from an estimated 12 matches for "shost_gendev".

2020 Sep 08
2
[PATCH] Rescan the entire target on transport reset when LUN is 0
...tatic void virtscsi_handle_transport_reset(struct virtio_scsi *vscsi, > > switch (virtio32_to_cpu(vscsi->vdev, event->reason)) { > case VIRTIO_SCSI_EVT_RESET_RESCAN: > - scsi_add_device(shost, 0, target, lun); > + if (lun == 0) { > + scsi_scan_target(&shost->shost_gendev, 0, target, > + SCAN_WILD_CARD, SCSI_SCAN_INITIAL); > + } else { > + scsi_add_device(shost, 0, target, lun); > + } > break; > case VIRTIO_SCSI_EVT_RESET_REMOVED: > sdev = scsi_device_lookup(shost, 0, target, lun); > Acked-by: Paolo Bonzini <pbonzini at...
2020 Sep 08
2
[PATCH] Rescan the entire target on transport reset when LUN is 0
...tatic void virtscsi_handle_transport_reset(struct virtio_scsi *vscsi, > > switch (virtio32_to_cpu(vscsi->vdev, event->reason)) { > case VIRTIO_SCSI_EVT_RESET_RESCAN: > - scsi_add_device(shost, 0, target, lun); > + if (lun == 0) { > + scsi_scan_target(&shost->shost_gendev, 0, target, > + SCAN_WILD_CARD, SCSI_SCAN_INITIAL); > + } else { > + scsi_add_device(shost, 0, target, lun); > + } > break; > case VIRTIO_SCSI_EVT_RESET_REMOVED: > sdev = scsi_device_lookup(shost, 0, target, lun); > Acked-by: Paolo Bonzini <pbonzini at...
2020 Mar 11
6
[PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands
On Tue, Mar 10, 2020 at 09:08:56PM +0000, John Garry wrote: > On 10/03/2020 18:32, Christoph Hellwig wrote: > > On Wed, Mar 11, 2020 at 12:25:28AM +0800, John Garry wrote: > > > From: Hannes Reinecke <hare at suse.com> > > > > > > Allocate a separate 'reserved_cmd_q' for sending reserved commands. > > > > Why? Reserved command
2020 Mar 11
6
[PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands
On Tue, Mar 10, 2020 at 09:08:56PM +0000, John Garry wrote: > On 10/03/2020 18:32, Christoph Hellwig wrote: > > On Wed, Mar 11, 2020 at 12:25:28AM +0800, John Garry wrote: > > > From: Hannes Reinecke <hare at suse.com> > > > > > > Allocate a separate 'reserved_cmd_q' for sending reserved commands. > > > > Why? Reserved command
2020 Apr 23
0
[PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands
...ote: >> On Tue, Apr 07, 2020 at 04:00:10PM +0200, Hannes Reinecke wrote: >>> My concern is this: >>> >>> struct scsi_device *scsi_get_host_dev(struct Scsi_Host *shost) >>> { >>> ????[ .. ] >>> ????starget = scsi_alloc_target(&shost->shost_gendev, 0, >>> shost->this_id); >>> ????[ .. ] >>> >>> and we have typically: >>> >>> drivers/scsi/hisi_sas/hisi_sas_v3_hw.c: .this_id??????????????? = -1, >>> >>> It's _very_ uncommon to have a negative number as the SCSI tar...
2020 Sep 08
0
[PATCH] Rescan the entire target on transport reset when LUN is 0
...tatic void virtscsi_handle_transport_reset(struct virtio_scsi *vscsi, > > switch (virtio32_to_cpu(vscsi->vdev, event->reason)) { > case VIRTIO_SCSI_EVT_RESET_RESCAN: > - scsi_add_device(shost, 0, target, lun); > + if (lun == 0) { > + scsi_scan_target(&shost->shost_gendev, 0, target, > + SCAN_WILD_CARD, SCSI_SCAN_INITIAL); > + } else { > + scsi_add_device(shost, 0, target, lun); > + } > break; > case VIRTIO_SCSI_EVT_RESET_REMOVED: > sdev = scsi_device_lookup(shost, 0, target, lun); > -- > 2.20.1
2020 Sep 08
0
[PATCH] Rescan the entire target on transport reset when LUN is 0
...andle_transport_reset(struct virtio_scsi *vscsi, >> >> switch (virtio32_to_cpu(vscsi->vdev, event->reason)) { >> case VIRTIO_SCSI_EVT_RESET_RESCAN: >> - scsi_add_device(shost, 0, target, lun); >> + if (lun == 0) { >> + scsi_scan_target(&shost->shost_gendev, 0, target, >> + SCAN_WILD_CARD, SCSI_SCAN_INITIAL); >> + } else { >> + scsi_add_device(shost, 0, target, lun); >> + } >> break; >> case VIRTIO_SCSI_EVT_RESET_REMOVED: >> sdev = scsi_device_lookup(shost, 0, target, lun); >> > >...
2020 Apr 07
0
[PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands
...ut it does still seem better to use the >>> request queue in the scsi device. >>> >> My concern is this: >> >> struct scsi_device *scsi_get_host_dev(struct Scsi_Host *shost) >> { >> ?????[ .. ] >> ?????starget = scsi_alloc_target(&shost->shost_gendev, 0, >> shost->this_id); >> ?????[ .. ] >> >> and we have typically: >> >> drivers/scsi/hisi_sas/hisi_sas_v3_hw.c: .this_id??????????????? = -1, >> >> It's _very_ uncommon to have a negative number as the SCSI target >> device; in fact,...
2020 Apr 07
0
[PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands
...device per host, not that I know if any more > would ever be required? But it does still seem better to use the request > queue in the scsi device. > My concern is this: struct scsi_device *scsi_get_host_dev(struct Scsi_Host *shost) { [ .. ] starget = scsi_alloc_target(&shost->shost_gendev, 0, shost->this_id); [ .. ] and we have typically: drivers/scsi/hisi_sas/hisi_sas_v3_hw.c: .this_id = -1, It's _very_ uncommon to have a negative number as the SCSI target device; in fact, it _is_ an unsigned int already. But alright, I'll give it a go; let's see...
2007 Jan 02
0
[PATCH 1/4] add scsi-target and IO_CMD_EPOLL_WAIT patches
...shost, ++ enum dma_data_direction data_dir, ++ gfp_t gfp_mask) ++{ ++ int write = (data_dir == DMA_TO_DEVICE); ++ struct request *rq; ++ struct scsi_cmnd *cmd; ++ struct scsi_tgt_cmd *tcmd; ++ ++ /* Bail if we can''t get a reference to the device */ ++ if (!get_device(&shost->shost_gendev)) ++ return NULL; ++ ++ tcmd = kmem_cache_alloc(scsi_tgt_cmd_cache, GFP_ATOMIC); ++ if (!tcmd) ++ goto put_dev; ++ ++ rq = blk_get_request(shost->uspace_req_q, write, gfp_mask); ++ if (!rq) ++ goto free_tcmd; ++ ++ cmd = __scsi_get_command(shost, gfp_mask); ++ if (!cmd) ++ goto release_rq; +...
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...me); if (stat) return stat; vid.roles = FC_PORT_ROLE_FCP_INITIATOR; vid.vport_type = FC_PORTTYPE_NPIV; /* vid.symbolic_name is already zero/NULL's */ vid.disable = false; /* always enabled */ /* we only allow support on Channel 0 !!! */ stat = fc_vport_setup(shost, 0, &shost->shost_gendev, &vid, &vport); return stat ? stat : count; } static FC_DEVICE_ATTR(host, vport_create, S_IWUSR, NULL, store_fc_host_vport_create); /* * "Short-cut" sysfs variable to delete a vport on a FC Host. * Vport is identified by a string containing "<WWPN>:<WWNN>&...
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...me); if (stat) return stat; vid.roles = FC_PORT_ROLE_FCP_INITIATOR; vid.vport_type = FC_PORTTYPE_NPIV; /* vid.symbolic_name is already zero/NULL's */ vid.disable = false; /* always enabled */ /* we only allow support on Channel 0 !!! */ stat = fc_vport_setup(shost, 0, &shost->shost_gendev, &vid, &vport); return stat ? stat : count; } static FC_DEVICE_ATTR(host, vport_create, S_IWUSR, NULL, store_fc_host_vport_create); /* * "Short-cut" sysfs variable to delete a vport on a FC Host. * Vport is identified by a string containing "<WWPN>:<WWNN>&...