Re: [PATCH V13.1] PCI/DOE: Add DOE mailbox support functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 11, 2022 at 11:47:31PM +0100, Matthew Wilcox wrote:
> On Mon, Jul 11, 2022 at 03:27:48PM -0700, ira.weiny@xxxxxxxxx wrote:
> > +/**
> > + * struct pci_doe_mb - State for a single DOE mailbox
> > + *
> > + * This state is used to manage a single DOE mailbox capability.  All fields
> > + * should be considered opaque to the consumers and the structure passed into
> > + * the helpers below after being created by devm_pci_doe_create()
> > + *
> > + * @pdev: PCI device this mailbox belongs to
> > + * @cap_offset: Capability offset
> > + * @prots: Array of protocols supported (encoded as long values)
> > + * @wq: Wait queue for work item
> > + * @work_queue: Queue of pci_doe_work items
> > + * @flags: Bit array of PCI_DOE_FLAG_* flags
> > + *
> > + * Note: @prots can't be allocated with struct size because the number of
> > + * protocols is not known until after this structure is in use.  However, the
> > + * single discovery protocol is always required to query for the number of
> > + * protocols.
> > + */
> 
> Can you add at least stub documentation in Documentation/PCI/doe.rst
> and include the kernel-doc from both pci-doe.c and pci-doe.h?

Yes that is a good idea, thanks.

> 
> > +static int pci_doe_abort(struct pci_doe_mb *doe_mb)
> > +{
> > +	struct pci_dev *pdev = doe_mb->pdev;
> > +	int offset = doe_mb->cap_offset;
> > +	unsigned long timeout_jiffies;
> > +
> > +	pci_dbg(pdev, "[%x] Issuing Abort\n", offset);
> 
> "Issuing DOE abort", perhaps?

I've set dev_fmt to prefix with "DOE: ".  So I think that should be ok.

Thanks for the review!
Ira




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux