public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nikita Leshenko" <nikita.leshchenko@oracle.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: devel@edk2.groups.io, liran.alon@oracle.com,
	aaron.young@oracle.com, Jordan Justen <jordan.l.justen@intel.com>,
	Ard Biesheuvel <ard.biesheuvel@arm.com>
Subject: Re: [edk2-devel] [PATCH v5 10/12] OvmfPkg/MptScsiDxe: Initialize hardware
Date: Mon, 4 May 2020 22:35:15 +0300	[thread overview]
Message-ID: <8C267BCF-8124-4E50-995A-EA0E0B79E44F@oracle.com> (raw)
In-Reply-To: <803cf42d-2c43-5c49-55ff-31b3acdba776@redhat.com>



> On 29 Apr 2020, at 17:55, Laszlo Ersek <lersek@redhat.com> wrote:
> 
> On 04/24/20 19:59, Nikita Leshenko wrote:
>> [...]
>> +STATIC
>> +EFI_STATUS
>> +MptScsiInit (
>> +  IN MPT_SCSI_DEV       *Dev
>> +  )
>> +{
>> +  EFI_STATUS                     Status;
>> +  MPT_IO_CONTROLLER_INIT_REQUEST Req;
> 
> [...]
> 
> You can either introduce a new typedef for the alignment / union under
> IndustryStandard, or just define an ad-hoc union here in this function,
> like PvScsiDxe does.
Yes you're right, I missed that, sorry.

> 
> [...]
> "Please use another STATIC_ASSERT here for expressing that the response
> structure size is an integer multiple of sizeof (UINT16)."
Missed that too, sorry
> 
>> [...]
>> //
>> // Ext SCSI Pass Thru
>> //
>> @@ -382,6 +557,11 @@ MptScsiControllerStart (
>>       ));
>>   }
>> 
>> +  Status = MptScsiInit (Dev);
>> +  if (EFI_ERROR (Status)) {
>> +    goto RestoreAttributes;
> 
> Hmmm, git-range-diff flags this as a v4->v5 change, and I don't
> understand why...
> 
> Ah, OK. In v4, we jumped to "RestorePciAttributes" -- which was a
> non-existent label. So I think the v4 variant of this patch didn't
> compile. I hope that's fixed now, with the above. :)
Yes, I ran `git rebase --exec` to make sure that all patches compiled and I noticed that.

Nikita
> 
> The rest of the updates / patch look fine to me.
> 
> Thanks!
> Laszlo
> 
> 
>> +  }
>> +
>>   //
>>   // Host adapter channel, doesn't exist
>>   //
>> @@ -406,11 +586,14 @@ MptScsiControllerStart (
>>                   &Dev->PassThru
>>                   );
>>   if (EFI_ERROR (Status)) {
>> -    goto RestoreAttributes;
>> +    goto UninitDev;
>>   }
>> 
>>   return EFI_SUCCESS;
>> 
>> +UninitDev:
>> +  MptScsiReset (Dev);
>> +
>> RestoreAttributes:
>>   Dev->PciIo->Attributes (
>>                 Dev->PciIo,
>> @@ -470,6 +653,8 @@ MptScsiControllerStop (
>>     return Status;
>>   }
>> 
>> +  MptScsiReset (Dev);
>> +
>>   Dev->PciIo->Attributes (
>>                 Dev->PciIo,
>>                 EfiPciIoAttributeOperationSet,
>> 
> 


  reply	other threads:[~2020-05-04 19:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 17:59 [PATCH v5 00/12] OvmfPkg: Support booting from Fusion-MPT SCSI controllers Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 01/12] OvmfPkg/MptScsiDxe: Create empty driver Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 02/12] OvmfPkg/MptScsiDxe: Install DriverBinding Protocol Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 03/12] OvmfPkg/MptScsiDxe: Report name of driver Nikita Leshenko
2020-04-24 18:02   ` [edk2-devel] " Carsey, Jaben
2020-04-25 10:44     ` Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 04/12] OvmfPkg/MptScsiDxe: Probe PCI devices and look for MptScsi Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 05/12] OvmfPkg/MptScsiDxe: Install stubbed EXT_SCSI_PASS_THRU Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 06/12] OvmfPkg/MptScsiDxe: Report targets and one LUN Nikita Leshenko
2020-04-29 13:38   ` [edk2-devel] " Laszlo Ersek
2020-04-29 13:39     ` Laszlo Ersek
2020-04-29 14:45       ` Liran Alon
2020-04-29 18:10         ` Laszlo Ersek
2020-04-24 17:59 ` [PATCH v5 07/12] OvmfPkg/MptScsiDxe: Build and decode DevicePath Nikita Leshenko
2020-04-29 13:44   ` [edk2-devel] " Laszlo Ersek
2020-04-24 17:59 ` [PATCH v5 08/12] OvmfPkg/MptScsiDxe: Open PciIo protocol for later use Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 09/12] OvmfPkg/MptScsiDxe: Set and restore PCI attributes Nikita Leshenko
2020-04-29 13:50   ` [edk2-devel] " Laszlo Ersek
2020-04-24 17:59 ` [PATCH v5 10/12] OvmfPkg/MptScsiDxe: Initialize hardware Nikita Leshenko
2020-04-29 14:55   ` [edk2-devel] " Laszlo Ersek
2020-05-04 19:35     ` Nikita Leshenko [this message]
2020-04-24 17:59 ` [PATCH v5 11/12] OvmfPkg/MptScsiDxe: Implement the PassThru method Nikita Leshenko
2020-04-30  9:47   ` [edk2-devel] " Laszlo Ersek
2020-05-04 20:08     ` Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 12/12] OvmfPkg/MptScsiDxe: Reset device on ExitBootServices() Nikita Leshenko
2020-04-30  9:48   ` [edk2-devel] " Laszlo Ersek

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-list 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=8C267BCF-8124-4E50-995A-EA0E0B79E44F@oracle.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox