From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
Cc: KY Srinivasan <kys@microsoft.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"olaf@aepfle.de" <olaf@aepfle.de>,
"apw@canonical.com" <apw@canonical.com>,
"jasowang@redhat.com" <jasowang@redhat.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
"vkuznets@redhat.com" <vkuznets@redhat.com>
Subject: Re: [PATCH 2/5] vmbus: add driver_override support
Date: Mon, 13 Aug 2018 21:40:51 +0200 [thread overview]
Message-ID: <20180813194051.GA11620@kroah.com> (raw)
In-Reply-To: <CY4PR21MB07739595C31B9B9349604C0ADC390@CY4PR21MB0773.namprd21.prod.outlook.com>
On Mon, Aug 13, 2018 at 07:30:50PM +0000, Michael Kelley (EOSG) wrote:
> From: kys@linuxonhyperv.com <kys@linuxonhyperv.com> Sent: Friday, August 10, 2018 4:06 PM
>
> > From: Stephen Hemminger <stephen@networkplumber.org>
> >
> > Add support for overriding the default driver for a VMBus device
> > in the same way that it can be done for PCI devices. This patch
> > adds the /sys/bus/vmbus/devices/.../driver_override file
> > and the logic for matching.
> >
> > This is used by driverctl tool to do driver override.
> > https://gitlab.com/driverctl/driverctl
> >
> > Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > ---
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > index b1b548a21f91..e6d8fdac6d8b 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -498,6 +498,54 @@ static ssize_t device_show(struct device *dev,
> > }
> > static DEVICE_ATTR_RO(device);
> >
> > +static ssize_t driver_override_store(struct device *dev,
> > + struct device_attribute *attr,
> > + const char *buf, size_t count)
> > +{
> > + struct hv_device *hv_dev = device_to_hv_device(dev);
> > + char *driver_override, *old, *cp;
> > +
> > + /* We need to keep extra room for a newline */
> > + if (count >= (PAGE_SIZE - 1))
> > + return -EINVAL;
>
> Does 'count' actually have a relationship to PAGE_SIZE, or
> is PAGE_SIZE just used as an arbitrary size limit? I'm
> wondering what happens on ARM64 with a 64K page size,
> for example. If it's just arbitrary, coding such a constant
> would be better.
sysfs buffers are PAGE_SIZE big.
next prev parent reply other threads:[~2018-08-13 19:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 23:05 [PATCH 0/5] Miscellaneous fixes/enhancements kys
2018-08-10 23:06 ` [PATCH 1/5] Tools: hv: Fix a bug in the key delete code kys
2018-08-10 23:06 ` [PATCH 2/5] vmbus: add driver_override support kys
2018-08-13 19:30 ` Michael Kelley (EOSG)
2018-08-13 19:40 ` gregkh [this message]
2018-08-13 19:56 ` Stephen Hemminger
2018-08-14 16:35 ` Stephen Hemminger
2018-08-14 19:13 ` Michael Kelley (EOSG)
2018-08-10 23:06 ` [PATCH 3/5] uio_hv_generic: increase size of receive and send buffers kys
2018-08-10 23:06 ` [PATCH 4/5] uio_hv_generic: drop #ifdef DEBUG kys
2018-08-10 23:06 ` [PATCH 5/5] Drivers: hv: vmbus: Fix synic per-cpu context initialization kys
2018-08-13 16:41 ` [PATCH 1/5] Tools: hv: Fix a bug in the key delete code Michael Kelley (EOSG)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180813194051.GA11620@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Michael.H.Kelley@microsoft.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.