[Qemu-devel] [PATCH v4 5/5] atapi: GESN: implement 'media' subcommand

2011-04-12 Thread Amit Shah
Implement the 'media' sub-command of the GET_EVENT_STATUS_NOTIFICATION command. This helps us report tray open, tray closed, no media, media present states to the guest. Newer Linux kernels (2.6.38+) rely on this command to revalidate discs after media change. This patch also sends out tray

Re: [Qemu-devel] [PATCH v4 5/5] atapi: GESN: implement 'media' subcommand

2011-04-12 Thread Kevin Wolf
Am 12.04.2011 16:09, schrieb Amit Shah: Implement the 'media' sub-command of the GET_EVENT_STATUS_NOTIFICATION command. This helps us report tray open, tray closed, no media, media present states to the guest. Newer Linux kernels (2.6.38+) rely on this command to revalidate discs after

Re: [Qemu-devel] [PATCH v4 5/5] atapi: GESN: implement 'media' subcommand

2011-04-12 Thread Amit Shah
On (Tue) 12 Apr 2011 [16:54:53], Kevin Wolf wrote: Am 12.04.2011 16:09, schrieb Amit Shah: Implement the 'media' sub-command of the GET_EVENT_STATUS_NOTIFICATION command. This helps us report tray open, tray closed, no media, media present states to the guest. Newer Linux kernels

Re: [Qemu-devel] [PATCH v4 5/5] atapi: GESN: implement 'media' subcommand

2011-04-12 Thread Jes Sorensen
On 04/12/11 16:09, Amit Shah wrote: diff --git a/hw/ide/core.c b/hw/ide/core.c index dafc049..209d8e6 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1084,6 +1084,49 @@ static int ide_dvd_read_structure(IDEState *s, int format, } } +static unsigned int

Re: [Qemu-devel] [PATCH v4 5/5] atapi: GESN: implement 'media' subcommand

2011-04-12 Thread Amit Shah
On (Tue) 12 Apr 2011 [20:33:39], Amit Shah wrote: On (Tue) 12 Apr 2011 [16:54:53], Kevin Wolf wrote: Am 12.04.2011 16:09, schrieb Amit Shah: Implement the 'media' sub-command of the GET_EVENT_STATUS_NOTIFICATION command. This helps us report tray open, tray closed, no media, media

Re: [Qemu-devel] [PATCH v4 5/5] atapi: GESN: implement 'media' subcommand

2011-04-12 Thread Kevin Wolf
Am 12.04.2011 17:03, schrieb Jes Sorensen: On 04/12/11 16:09, Amit Shah wrote: diff --git a/hw/ide/core.c b/hw/ide/core.c index dafc049..209d8e6 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1084,6 +1084,49 @@ static int ide_dvd_read_structure(IDEState *s, int format, } }

Re: [Qemu-devel] [PATCH v4 5/5] atapi: GESN: implement 'media' subcommand

2011-04-12 Thread Jes Sorensen
On 04/12/11 17:13, Kevin Wolf wrote: Am 12.04.2011 17:03, schrieb Jes Sorensen: Shouldn't you verify that you don't exceed max_len in this? Not necessary (the buffer is always 2048 bytes), but it looks like the max_len parameter is unused now, so it could be removed. Kevin That works

Re: [Qemu-devel] [PATCH v4 5/5] atapi: GESN: implement 'media' subcommand

2011-04-12 Thread Amit Shah
On (Tue) 12 Apr 2011 [17:11:22], Kevin Wolf wrote: Am 12.04.2011 17:03, schrieb Amit Shah: On (Tue) 12 Apr 2011 [16:54:53], Kevin Wolf wrote: Am 12.04.2011 16:09, schrieb Amit Shah: Implement the 'media' sub-command of the GET_EVENT_STATUS_NOTIFICATION command. This helps us report tray