mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Nothing really exciting: some groundwork for changing virtio endian, and
some robustness fixes for broken virtio devices, plus minor tweaks.
[vs last pull request: added the virtio-scsi broken vq escape patch, which
I somehow lost.]
Cheers,
Rusty.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
iQIcBAABAgAGBQJSgDsJAAoJENkgDmzRrbjxEE4P/jXqZHS/HdlxW9k0BjKKlEIF
PdtCoP3UhWTdskXvy2pD8m6nYn214MEJYUIa4HFlIEZsdxhuexzQHY19Ynkjagyv
57sRsUUm5fYQLIL7IUh2DUD1VU38hUFinno/y333szzvCj9qITDA/QABsiWxK8NO
dq+Lmeixgrhc5yN9iryW+gZV+hekJIZ4LsU5ejSaJucKblzXUH8qIbmSthG7RTYJ
tr4J7xTTXbhxY4CoC5Dpx2hvsFkvzaAIvI4Nr1mDjfq5cR8BaYvnC89U1IbhdAey
p1AbZE58JLrY+Z8K8LBRGV2KjO8qSZ6R47hbZ9nAnodJYB7sZLyj6jUe1q+/htuC
Dh9Xm9O4eW2xNaFk20dYeIF4UU5/HzdsbvG/IlH8x4sm8/K706ocYyAOHlzYUg2T
k7gltrgDzDokMgb2R44gwnr4oaJ2q8Gne6JXswlPEv2eRs6vNnA5Xhc0rEHGkU6C
gYn1vNFN6yx0vf2syG/Ce5pZtMxGpefKQkHzzWdq8FKr1B9s54dDuf2hls7J8A9t
OQT1gE33yURSelf4Kh4k9zWXaWk/Ohv9l2R1cqpALnJ4/+q0fP5t7HdK500S7aax
DxLeFeqvsBw7nlWgsGxQmt+fjITQFHhcDiwst0ehnt6RbDEW7XPIguz0K/gyhxYG
+UNbl/5Gr64jnUX3YCzm
=vY2L
-----END PGP SIGNATURE-----
Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull virtio updates from Rusty Russell:
"Nothing really exciting: some groundwork for changing virtio endian,
and some robustness fixes for broken virtio devices, plus minor
tweaks"
* tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
virtio_scsi: verify if queue is broken after virtqueue_get_buf()
x86, asmlinkage, lguest: Pass in globals into assembler statement
virtio: mmio: fix signature checking for BE guests
virtio_ring: adapt to notify() returning bool
virtio_net: verify if queue is broken after virtqueue_get_buf()
virtio_console: verify if queue is broken after virtqueue_get_buf()
virtio_blk: verify if queue is broken after virtqueue_get_buf()
virtio_ring: add new function virtqueue_is_broken()
virtio_test: verify if virtqueue_kick() succeeded
virtio_net: verify if virtqueue_kick() succeeded
virtio_ring: let virtqueue_{kick()/notify()} return a bool
virtio_ring: change host notification API
virtio_config: remove virtio_config_val
virtio: use size-based config accessors.
virtio_config: introduce size-based accessors.
virtio_ring: plug kmemleak false positive.
virtio: pm: use CONFIG_PM_SLEEP instead of CONFIG_PM
This commit is contained in:
commit
b746f9c794
21 changed files with 310 additions and 166 deletions
|
|
@ -224,6 +224,9 @@ static void virtscsi_vq_done(struct virtio_scsi *vscsi,
|
|||
virtqueue_disable_cb(vq);
|
||||
while ((buf = virtqueue_get_buf(vq, &len)) != NULL)
|
||||
fn(vscsi, buf);
|
||||
|
||||
if (unlikely(virtqueue_is_broken(vq)))
|
||||
break;
|
||||
} while (!virtqueue_enable_cb(vq));
|
||||
spin_unlock_irqrestore(&virtscsi_vq->vq_lock, flags);
|
||||
}
|
||||
|
|
@ -710,19 +713,15 @@ static struct scsi_host_template virtscsi_host_template_multi = {
|
|||
#define virtscsi_config_get(vdev, fld) \
|
||||
({ \
|
||||
typeof(((struct virtio_scsi_config *)0)->fld) __val; \
|
||||
vdev->config->get(vdev, \
|
||||
offsetof(struct virtio_scsi_config, fld), \
|
||||
&__val, sizeof(__val)); \
|
||||
virtio_cread(vdev, struct virtio_scsi_config, fld, &__val); \
|
||||
__val; \
|
||||
})
|
||||
|
||||
#define virtscsi_config_set(vdev, fld, val) \
|
||||
(void)({ \
|
||||
do { \
|
||||
typeof(((struct virtio_scsi_config *)0)->fld) __val = (val); \
|
||||
vdev->config->set(vdev, \
|
||||
offsetof(struct virtio_scsi_config, fld), \
|
||||
&__val, sizeof(__val)); \
|
||||
})
|
||||
virtio_cwrite(vdev, struct virtio_scsi_config, fld, &__val); \
|
||||
} while(0)
|
||||
|
||||
static void __virtscsi_set_affinity(struct virtio_scsi *vscsi, bool affinity)
|
||||
{
|
||||
|
|
@ -954,7 +953,7 @@ static void virtscsi_remove(struct virtio_device *vdev)
|
|||
scsi_host_put(shost);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int virtscsi_freeze(struct virtio_device *vdev)
|
||||
{
|
||||
virtscsi_remove_vqs(vdev);
|
||||
|
|
@ -988,7 +987,7 @@ static struct virtio_driver virtio_scsi_driver = {
|
|||
.id_table = id_table,
|
||||
.probe = virtscsi_probe,
|
||||
.scan = virtscsi_scan,
|
||||
#ifdef CONFIG_PM
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
.freeze = virtscsi_freeze,
|
||||
.restore = virtscsi_restore,
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue