2019-04-15 06:00:44

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the scsi tree with the block tree

Hi all,

Today's linux-next merge of the scsi tree got a conflict in:

drivers/scsi/sd.c

between commit:

c92e2f04b359 ("block: disk_events: introduce event flags")

from the block tree and commit:

21e6ba3f0e02 ("scsi: sd: Rely on the driver core for asynchronous probing")
d16ece577bf2 ("scsi: sd: Inline sd_probe_part2()")

from the scsi tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc drivers/scsi/sd.c
index ebc80354714c,e610b393809b..000000000000
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@@ -3404,8 -3374,49 +3342,50 @@@ static int sd_probe(struct device *dev
get_device(dev);
dev_set_drvdata(dev, sdkp);

- get_device(&sdkp->dev); /* prevent release before async_schedule */
- async_schedule_domain(sd_probe_async, sdkp, &scsi_sd_probe_domain);
+ gd->major = sd_major((index & 0xf0) >> 4);
+ gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
+
+ gd->fops = &sd_fops;
+ gd->private_data = &sdkp->driver;
+ gd->queue = sdkp->device->request_queue;
+
+ /* defaults, until the device tells us otherwise */
+ sdp->sector_size = 512;
+ sdkp->capacity = 0;
+ sdkp->media_present = 1;
+ sdkp->write_prot = 0;
+ sdkp->cache_override = 0;
+ sdkp->WCE = 0;
+ sdkp->RCD = 0;
+ sdkp->ATO = 0;
+ sdkp->first_scan = 1;
+ sdkp->max_medium_access_timeouts = SD_MAX_MEDIUM_TIMEOUTS;
+
+ sd_revalidate_disk(gd);
+
+ gd->flags = GENHD_FL_EXT_DEVT;
+ if (sdp->removable) {
+ gd->flags |= GENHD_FL_REMOVABLE;
+ gd->events |= DISK_EVENT_MEDIA_CHANGE;
++ gd->event_flags = DISK_EVENT_FLAG_POLL | DISK_EVENT_FLAG_UEVENT;
+ }
+
+ blk_pm_runtime_init(sdp->request_queue, dev);
+ device_add_disk(dev, gd, NULL);
+ if (sdkp->capacity)
+ sd_dif_config_host(sdkp);
+
+ sd_revalidate_disk(gd);
+
+ if (sdkp->security) {
+ sdkp->opal_dev = init_opal_dev(sdp, &sd_sec_submit);
+ if (sdkp->opal_dev)
+ sd_printk(KERN_NOTICE, sdkp, "supports TCG Opal\n");
+ }
+
+ sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n",
+ sdp->removable ? "removable " : "");
+ scsi_autopm_put_device(sdp);

return 0;


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2019-04-15 13:49:15

by Bart Van Assche

[permalink] [raw]
Subject: Re: linux-next: manual merge of the scsi tree with the block tree

On 4/14/19 10:59 PM, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the scsi tree got a conflict in:
>
> drivers/scsi/sd.c
>
> between commit:
>
> c92e2f04b359 ("block: disk_events: introduce event flags")
>
> from the block tree and commit:
>
> 21e6ba3f0e02 ("scsi: sd: Rely on the driver core for asynchronous probing")
> d16ece577bf2 ("scsi: sd: Inline sd_probe_part2()")
>
> from the scsi tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

Thanks Stephen for having resolved this conflict. The conflict resolution
looks good to me.

Bart.


2019-04-17 19:12:28

by Martin Wilck

[permalink] [raw]
Subject: Re: linux-next: manual merge of the scsi tree with the block tree

On Mon, 2019-04-15 at 06:48 -0700, Bart Van Assche wrote:
> On 4/14/19 10:59 PM, Stephen Rothwell wrote:
> > Hi all,
> >
> > Today's linux-next merge of the scsi tree got a conflict in:
> >
> > drivers/scsi/sd.c
> >
> > between commit:
> >
> > c92e2f04b359 ("block: disk_events: introduce event flags")
> >
> > from the block tree and commit:
> >
> > 21e6ba3f0e02 ("scsi: sd: Rely on the driver core for asynchronous
> > probing")
> > d16ece577bf2 ("scsi: sd: Inline sd_probe_part2()")
> >
> > from the scsi tree.
> >
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your
> > tree
> > is submitted for merging. You may also want to consider
> > cooperating
> > with the maintainer of the conflicting tree to minimise any
> > particularly
> > complex conflicts.
>
> Thanks Stephen for having resolved this conflict. The conflict
> resolution
> looks good to me.

Yes, it looks good to me as well.

Thanks,
Martin