All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Alexander Holler <holler@ahsoftware.de>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/2] USB: xhci: rename ambiguous named XHCI_NEC_HOST to XHCI_NEC_SHOW_FW
Date: Wed, 29 May 2013 15:25:00 -0700	[thread overview]
Message-ID: <20130529222500.GC7151@xanatos> (raw)
In-Reply-To: <1369862073-3685-1-git-send-email-holler@ahsoftware.de>


On Wed, May 29, 2013 at 11:14:32PM +0200, Alexander Holler wrote:
> Current Renesas Electronics XHCI hosts (which were formerly NEC)
> do support the same vendor command to show the firmware. Rename the
> ambigious named define XHCI_NEC_HOST to XHCI_NEC_SHOW_FW because it's
> only used to display the firmware version. Besides that, change the
> output "... NEC firmware version x.y" to "... firmware version x.y"
> to not confuse owners of Renesas USB hosts.
> 
> (so only cosmetic, no functional changes)

I'm actually inclined to say you should just rip out the firmware
version code entirely.  I haven't needed to use it for years, and if
Renesas changed their vendor command set, I would rather not submit
random commands to the host.

So, can you redo this patch to just rip out XHCI_NEC_HOST and everything
that uses it?

Sarah Sharp

> 
> Signed-off-by: Alexander Holler <holler@ahsoftware.de>
> ---
>  drivers/usb/host/xhci-pci.c  | 2 +-
>  drivers/usb/host/xhci-ring.c | 6 +++---
>  drivers/usb/host/xhci.c      | 4 ++--
>  drivers/usb/host/xhci.h      | 2 +-
>  4 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index 1a30c38..f47d3d2 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -79,7 +79,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
>  	}
>  
>  	if (pdev->vendor == PCI_VENDOR_ID_NEC)
> -		xhci->quirks |= XHCI_NEC_HOST;
> +		xhci->quirks |= XHCI_NEC_SHOW_FW;
>  
>  	if (pdev->vendor == PCI_VENDOR_ID_AMD && xhci->hci_version == 0x96)
>  		xhci->quirks |= XHCI_AMD_0x96_HOST;
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 1969c00..761d566 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -1489,11 +1489,11 @@ bandwidth_change:
>  					"for disabled slot %u\n", slot_id);
>  		break;
>  	case TRB_TYPE(TRB_NEC_GET_FW):
> -		if (!(xhci->quirks & XHCI_NEC_HOST)) {
> +		if (!(xhci->quirks & XHCI_NEC_SHOW_FW)) {
>  			xhci->error_bitmask |= 1 << 6;
>  			break;
>  		}
> -		xhci_dbg(xhci, "NEC firmware version %2x.%02x\n",
> +		xhci_dbg(xhci, "firmware version %2x.%02x\n",
>  			 NEC_FW_MAJOR(le32_to_cpu(event->status)),
>  			 NEC_FW_MINOR(le32_to_cpu(event->status)));
>  		break;
> @@ -1512,7 +1512,7 @@ static void handle_vendor_event(struct xhci_hcd *xhci,
>  
>  	trb_type = TRB_FIELD_TO_TYPE(le32_to_cpu(event->generic.field[3]));
>  	xhci_dbg(xhci, "Vendor specific event TRB type = %u\n", trb_type);
> -	if (trb_type == TRB_NEC_CMD_COMP && (xhci->quirks & XHCI_NEC_HOST))
> +	if (trb_type == TRB_NEC_CMD_COMP && (xhci->quirks & XHCI_NEC_SHOW_FW))
>  		handle_cmd_completion(xhci, &event->event_cmd);
>  }
>  
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index b4aa79d..b961e9a 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -588,7 +588,7 @@ static int xhci_run_finished(struct xhci_hcd *xhci)
>  	xhci->shared_hcd->state = HC_STATE_RUNNING;
>  	xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;
>  
> -	if (xhci->quirks & XHCI_NEC_HOST)
> +	if (xhci->quirks & XHCI_NEC_SHOW_FW)
>  		xhci_ring_cmd_db(xhci);
>  
>  	xhci_dbg(xhci, "Finished xhci_run for USB3 roothub\n");
> @@ -673,7 +673,7 @@ int xhci_run(struct usb_hcd *hcd)
>  			&xhci->ir_set->irq_pending);
>  	xhci_print_ir_set(xhci, 0);
>  
> -	if (xhci->quirks & XHCI_NEC_HOST)
> +	if (xhci->quirks & XHCI_NEC_SHOW_FW)
>  		xhci_queue_vendor_command(xhci, 0, 0, 0,
>  				TRB_TYPE(TRB_NEC_GET_FW));
>  
> diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
> index 29c978e..e483f12 100644
> --- a/drivers/usb/host/xhci.h
> +++ b/drivers/usb/host/xhci.h
> @@ -1493,7 +1493,7 @@ struct xhci_hcd {
>  	unsigned int		quirks;
>  #define	XHCI_LINK_TRB_QUIRK	(1 << 0)
>  #define XHCI_RESET_EP_QUIRK	(1 << 1)
> -#define XHCI_NEC_HOST		(1 << 2)
> +#define XHCI_NEC_SHOW_FW	(1 << 2)
>  #define XHCI_AMD_PLL_FIX	(1 << 3)
>  #define XHCI_SPURIOUS_SUCCESS	(1 << 4)
>  /*
> -- 
> 1.8.1.5
> 

  parent reply	other threads:[~2013-05-29 22:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 21:14 [PATCH 1/2] USB: xhci: rename ambiguous named XHCI_NEC_HOST to XHCI_NEC_SHOW_FW Alexander Holler
2013-05-29 21:14 ` [PATCH 2/2] USB: xhci: show firmware version for Renesas XHCI hosts if debug is enabled Alexander Holler
2013-05-29 22:25 ` Sarah Sharp [this message]
2013-05-30  4:16   ` [PATCH 1/2] USB: xhci: rename ambiguous named XHCI_NEC_HOST to XHCI_NEC_SHOW_FW Alexander Holler
2013-05-30 17:46     ` Alexander Holler
2013-05-30 18:20     ` Sarah Sharp
2013-05-31  0:20       ` Alexander Holler

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-all 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=20130529222500.GC7151@xanatos \
    --to=sarah.a.sharp@linux.intel.com \
    --cc=holler@ahsoftware.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.