Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1448076
| From | "Bounine, Alexandre" <Alexandre.Bounine@idt.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 13/13] rapidio/switches: add driver for IDT gen3 switches |
| Date | 2016-07-21 21:10 +0200 |
| Message-ID | <rXrw5-3fM-23@gated-at.bofh.it> (permalink) |
| References | <rXqJI-2G4-11@gated-at.bofh.it> <rXr34-2Nx-25@gated-at.bofh.it> <rXr34-2Nx-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> -----Original Message-----
> From: Andrew Morton [mailto:akpm@linux-foundation.org]
> Sent: Thursday, July 21, 2016 2:37 PM
> To: Bounine, Alexandre
> Cc: Matt Porter; Andre van Herk; Wood, Barry; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH 13/13] rapidio/switches: add driver for IDT gen3
> switches
>
> On Thu, 21 Jul 2016 14:18:54 -0400 Alexandre Bounine
> <alexandre.bounine@idt.com> wrote:
>
> > Add RapidIO switch driver for IDT Gen3 switch devices: RXS1632 and
> RXS2448.
> >
> > ...
> >
> > +static int
> > +idtg3_em_handler(struct rio_dev *rdev, u8 pnum)
> > +{
> > + u32 err_status;
> > + u32 rval;
> > +
> > + rio_read_config_32(rdev,
> > + RIO_DEV_PORT_N_ERR_STS_CSR(rdev, pnum),
> > + &err_status);
> > +
> > + /* Do nothing for device/link removal */
> > + if (err_status & RIO_PORT_N_ERR_STS_PORT_UNINIT)
> > + return 0;
> > +
> > + /* When link is OK we have a device insertion.
> > + * Request port soft reset to clear errors if they present.
> > + * Inbound and outbound ackIDs will be 0 after reset.
> > + */
> > + if (err_status & (RIO_PORT_N_ERR_STS_OUT_ES |
> > + RIO_PORT_N_ERR_STS_INP_ES)) {
> > + rio_read_config_32(rdev, RIO_PLM_SPx_IMP_SPEC_CTL(pnum),
> &rval);
> > + rio_write_config_32(rdev, RIO_PLM_SPx_IMP_SPEC_CTL(pnum),
> > + rval | RIO_PLM_SPx_IMP_SPEC_CTL_SOFT_RST);
> > + udelay(10);
> > + rio_write_config_32(rdev, RIO_PLM_SPx_IMP_SPEC_CTL(pnum),
> rval);
> > + mdelay(500);
>
> Yikes, that's a very long busywait. A half-second machine freeze on
> uniprocessor (if such exists ;)). We can't use msleep()?
>
My bad ;) No problem with msleep() at all. We just need to give enough time
for Rapidio link to get back (spec defines 500mS).
Do you want a patch on patch?
> > + }
> > +
> > + return 0;
> > +}
> >
> > ...
> >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/13] RapidIO subsystem updates Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:20 +0200
[PATCH 08/13] rapidio: fix error handling in mbox request/release functions Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:30 +0200
[PATCH 09/13] rapidio/idt_gen2: fix locking warning Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:30 +0200
[PATCH 11/13] rapidio: modify for rev.3 specification changes Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:30 +0200
[PATCH 12/13] powerpc/fsl_rio: apply changes for RIO spec rev 3 Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:30 +0200
[PATCH 05/13] rapidio/tsi721: add PCIe MRRS override parameter Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:30 +0200
[PATCH 06/13] rapidio/tsi721: add messaging mbox selector parameter Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:30 +0200
[PATCH 01/13] rapidio: Remove unnecessary 0x prefixes before %pa extension uses Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:30 +0200
Re: [PATCH 13/13] rapidio/switches: add driver for IDT gen3 switches Andrew Morton <akpm@linux-foundation.org> - 2016-07-21 20:40 +0200
RE: [PATCH 13/13] rapidio/switches: add driver for IDT gen3 switches "Bounine, Alexandre" <Alexandre.Bounine@idt.com> - 2016-07-21 21:10 +0200
Re: [PATCH 13/13] rapidio/switches: add driver for IDT gen3 switches Andrew Morton <akpm@linux-foundation.org> - 2016-07-21 21:10 +0200
[PATCH 13/13] rapidio/switches: add driver for IDT gen3 switches Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:40 +0200
[PATCH 10/13] rapidio: change inbound window size type to u64 Alexandre Bounine <alexandre.bounine@idt.com> - 2016-07-21 20:40 +0200
csiph-web