kernel-team Digest, Vol 125, Issue 9
Joel Croteau
jcroteau at google.com
Thu Jun 4 11:51:49 UTC 2015
I'm sorry, I sent that to the wrong email list. Please disregard, I will
submit it properly shortly.
On Thu, Jun 4, 2015 at 4:50 AM Joel Croteau <jcroteau at google.com> wrote:
> And one more patch to look at. If you're wondering, I've been rebuilding
> the kernel for my Ubuntu system at home, and these patches are all to
> address various build errors I ran into while doing so.
>
> Setting a local version name appears to cause errors when packaging,
> so fix that by enforcing leaving it unset.
> ---
> debian.master/config/annotations | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/debian.master/config/annotations
> b/debian.master/config/annotations
> index 4250196..9e5f1c8 100644
> --- a/debian.master/config/annotations
> +++ b/debian.master/config/annotations
> @@ -2742,7 +2742,7 @@ CONFIG_KERNEL_MODE_NEON p
> policy<{'arm64': 'y', 'armhf': 'y'}>
> # Menu: General setup
> CONFIG_CROSS_COMPILE ""
> CONFIG_COMPILE_TEST n
> -CONFIG_LOCALVERSION ""
> +CONFIG_LOCALVERSION "" mark<ENFORCED>
> note<triggers packaging failures>
> CONFIG_LOCALVERSION_AUTO n
> CONFIG_DEFAULT_HOSTNAME "(none)"
> CONFIG_VERSION_SIGNATURE ""
> --
> 2.1.4
>
> On Thu, Jun 4, 2015 at 2:46 AM <kernel-team-request at lists.ubuntu.com>
> wrote:
>
>> Send kernel-team mailing list submissions to
>> kernel-team at lists.ubuntu.com
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>> or, via email, send a message with subject or body 'help' to
>> kernel-team-request at lists.ubuntu.com
>>
>> You can reach the person managing the list at
>> kernel-team-owner at lists.ubuntu.com
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of kernel-team digest..."
>>
>>
>> Today's Topics:
>>
>> 1. [PATCH][Vivid] ahci: avoton port-disable reset-quirk
>> (Rafael David Tinoco)
>> 2. Mainline Build v2.6.32.67 (Mainline Builds)
>> 3. [Vivid][SRU][PATCH] powerpc/powernv: Check image loaded or
>> not before calling flash (Chris J Arges)
>> 4. The Daily Bug Report for Wednesday, 03. June 2015 22:30 UTC
>> (brad.figg at canonical.com)
>> 5. [Trusty][SRU][PATCH] LP#1461730 -- xfs: avoid false
>> quotacheck after unclean shutdown (Seyeong Kim)
>> 6. [Trusty][SRU][PATCH] xfs: avoid false quotacheck after
>> unclean shutdown (Seyeong Kim)
>> 7. [Vivid][PATCH 1/6] Bluetooth: btusb: support public address
>> configuration for ath3012 (Wen-chien Jesse Sung)
>> 8. [Vivid][PATCH 2/6] Bluetooth: btusb: Add setup callback for
>> chip init on USB (Wen-chien Jesse Sung)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Wed, 3 Jun 2015 11:44:06 -0300
>> From: Rafael David Tinoco <inaddy at inaddy.org>
>> To: kernel-team at lists.canonical.com
>> Subject: [PATCH][Vivid] ahci: avoton port-disable reset-quirk
>> Message-ID:
>> <1433342646-15003-3-git-send-email-rafael.tinoco at canonical.com>
>>
>> BugLink: https://bugs.launchpad.net/bugs/1458617
>>
>> Avoton AHCI occasionally sees drive probe timeouts at driver load time.
>> When this happens SCR_STATUS indicates device detected, but no D2H FIS
>> reception. Reset the internal link state machines by bouncing
>> port-enable in the PCS register when this occurs.
>>
>> OriginalAuthor: Dan Williams <dan.j.williams at intel.com>
>> Signed-off-by: Dan Williams <dan.j.williams at intel.com>
>> (backported from commit dbfe8ef5599a5370abc441fcdbb382b656563eb4 upstream)
>> Signed-off-by: Tejun Heo <tj at kernel.org>
>> Signed-off-by: Rafael David Tinoco <rafael.tinoco at canonical.com>
>> ---
>> drivers/ata/ahci.c | 103
>> ++++++++++++++++++++++++++++++++++++++++++++++++-----
>> 1 file changed, 95 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
>> index 3b18399..8e7574a 100644
>> --- a/drivers/ata/ahci.c
>> +++ b/drivers/ata/ahci.c
>> @@ -66,6 +66,7 @@ enum board_ids {
>> board_ahci_yes_fbs,
>>
>> /* board IDs for specific chipsets in alphabetical order */
>> + board_ahci_avn,
>> board_ahci_mcp65,
>> board_ahci_mcp77,
>> board_ahci_mcp89,
>> @@ -84,6 +85,8 @@ enum board_ids {
>> static int ahci_init_one(struct pci_dev *pdev, const struct
>> pci_device_id *ent);
>> static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int
>> *class,
>> unsigned long deadline);
>> +static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
>> + unsigned long deadline);
>> static void ahci_mcp89_apple_enable(struct pci_dev *pdev);
>> static bool is_mcp89_apple(struct pci_dev *pdev);
>> static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int
>> *class,
>> @@ -107,6 +110,11 @@ static struct ata_port_operations ahci_p5wdh_ops = {
>> .hardreset = ahci_p5wdh_hardreset,
>> };
>>
>> +static struct ata_port_operations ahci_avn_ops = {
>> + .inherits = &ahci_ops,
>> + .hardreset = ahci_avn_hardreset,
>> +};
>> +
>> static const struct ata_port_info ahci_port_info[] = {
>> /* by features */
>> [board_ahci] = {
>> @@ -151,6 +159,12 @@ static const struct ata_port_info ahci_port_info[] =
>> {
>> .port_ops = &ahci_ops,
>> },
>> /* by chipsets */
>> + [board_ahci_avn] = {
>> + .flags = AHCI_FLAG_COMMON,
>> + .pio_mask = ATA_PIO4,
>> + .udma_mask = ATA_UDMA6,
>> + .port_ops = &ahci_avn_ops,
>> + },
>> [board_ahci_mcp65] = {
>> AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA |
>> AHCI_HFLAG_NO_PMP |
>> AHCI_HFLAG_YES_NCQ),
>> @@ -290,14 +304,14 @@ static const struct pci_device_id ahci_pci_tbl[] = {
>> { PCI_VDEVICE(INTEL, 0x1f27), board_ahci }, /* Avoton RAID */
>> { PCI_VDEVICE(INTEL, 0x1f2e), board_ahci }, /* Avoton RAID */
>> { PCI_VDEVICE(INTEL, 0x1f2f), board_ahci }, /* Avoton RAID */
>> - { PCI_VDEVICE(INTEL, 0x1f32), board_ahci }, /* Avoton AHCI */
>> - { PCI_VDEVICE(INTEL, 0x1f33), board_ahci }, /* Avoton AHCI */
>> - { PCI_VDEVICE(INTEL, 0x1f34), board_ahci }, /* Avoton RAID */
>> - { PCI_VDEVICE(INTEL, 0x1f35), board_ahci }, /* Avoton RAID */
>> - { PCI_VDEVICE(INTEL, 0x1f36), board_ahci }, /* Avoton RAID */
>> - { PCI_VDEVICE(INTEL, 0x1f37), board_ahci }, /* Avoton RAID */
>> - { PCI_VDEVICE(INTEL, 0x1f3e), board_ahci }, /* Avoton RAID */
>> - { PCI_VDEVICE(INTEL, 0x1f3f), board_ahci }, /* Avoton RAID */
>> + { PCI_VDEVICE(INTEL, 0x1f32), board_ahci_avn }, /* Avoton AHCI */
>> + { PCI_VDEVICE(INTEL, 0x1f33), board_ahci_avn }, /* Avoton AHCI */
>> + { PCI_VDEVICE(INTEL, 0x1f34), board_ahci_avn }, /* Avoton RAID */
>> + { PCI_VDEVICE(INTEL, 0x1f35), board_ahci_avn }, /* Avoton RAID */
>> + { PCI_VDEVICE(INTEL, 0x1f36), board_ahci_avn }, /* Avoton RAID */
>> + { PCI_VDEVICE(INTEL, 0x1f37), board_ahci_avn }, /* Avoton RAID */
>> + { PCI_VDEVICE(INTEL, 0x1f3e), board_ahci_avn }, /* Avoton RAID */
>> + { PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */
>> { PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
>> { PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
>> { PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
>> @@ -675,6 +689,79 @@ static int ahci_p5wdh_hardreset(struct ata_link
>> *link, unsigned int *class,
>> return rc;
>> }
>>
>> +/*
>> + * ahci_avn_hardreset - attempt more aggressive recovery of Avoton ports.
>> + *
>> + * It has been observed with some SSDs that the timing of events in the
>> + * link synchronization phase can leave the port in a state that can not
>> + * be recovered by a SATA-hard-reset alone. The failing signature is
>> + * SStatus.DET stuck at 1 ("Device presence detected but Phy
>> + * communication not established"). It was found that unloading and
>> + * reloading the driver when this problem occurs allows the drive
>> + * connection to be recovered (DET advanced to 0x3). The critical
>> + * component of reloading the driver is that the port state machines are
>> + * reset by bouncing "port enable" in the AHCI PCS configuration
>> + * register. So, reproduce that effect by bouncing a port whenever we
>> + * see DET==1 after a reset.
>> + */
>> +static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
>> + unsigned long deadline)
>> +{
>> + const unsigned long *timing =
>> sata_ehc_deb_timing(&link->eh_context);
>> + struct ata_port *ap = link->ap;
>> + struct ahci_port_priv *pp = ap->private_data;
>> + struct ahci_host_priv *hpriv = ap->host->private_data;
>> + u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
>> + unsigned long tmo = deadline - jiffies;
>> + struct ata_taskfile tf;
>> + bool online;
>> + int rc, i;
>> +
>> + DPRINTK("ENTER\n");
>> +
>> + ahci_stop_engine(ap);
>> +
>> + for (i = 0; i < 2; i++) {
>> + u16 val;
>> + u32 sstatus;
>> + int port = ap->port_no;
>> + struct ata_host *host = ap->host;
>> + struct pci_dev *pdev = to_pci_dev(host->dev);
>> +
>> + /* clear D2H reception area to properly wait for D2H FIS
>> */
>> + ata_tf_init(link->device, &tf);
>> + tf.command = ATA_BUSY;
>> + ata_tf_to_fis(&tf, 0, 0, d2h_fis);
>> +
>> + rc = sata_link_hardreset(link, timing, deadline, &online,
>> + ahci_check_ready);
>> +
>> + if (sata_scr_read(link, SCR_STATUS, &sstatus) != 0 ||
>> + (sstatus & 0xf) != 1)
>> + break;
>> +
>> + ata_link_printk(link, KERN_INFO, "avn bounce port%d\n",
>> + port);
>> +
>> + pci_read_config_word(pdev, 0x92, &val);
>> + val &= ~(1 << port);
>> + pci_write_config_word(pdev, 0x92, val);
>> + ata_msleep(ap, 1000);
>> + val |= 1 << port;
>> + pci_write_config_word(pdev, 0x92, val);
>> + deadline += tmo;
>> + }
>> +
>> + hpriv->start_engine(ap);
>> +
>> + if (online)
>> + *class = ahci_dev_classify(ap);
>> +
>> + DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);
>> + return rc;
>> +}
>> +
>> +
>> #ifdef CONFIG_PM
>> static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t
>> mesg)
>> {
>> --
>> 2.1.4
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 2
>> From: Mainline Builds <kernel-team at lists.ubuntu.com>
>> To: Kernel Team <kernel-team at lists.ubuntu.com>
>> Subject: Mainline Build v2.6.32.67
>> Message-ID:
>> <mailman.12555.1433411172.18832.kernel-team at lists.ubuntu.com>
>>
>> The mainline build for v2.6.32.67 is now complete and available at the URL
>> below:
>>
>> http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32.67-lucid/
>>
>> See the CHANGES file for the list of changes from the previous version:
>>
>>
>> http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32.67-lucid/CHANGES
>>
>> Note that these builds do not contain any Ubuntu specific patches and
>> are not supported.
>>
>> Kernel Team
>>
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Wed, 3 Jun 2015 17:47:44 -0500
>> From: Chris J Arges <chris.j.arges at canonical.com>
>> To: kernel-team at lists.ubuntu.com
>> Subject: [Vivid][SRU][PATCH] powerpc/powernv: Check image loaded or
>> not before calling flash
>> Message-ID:
>> <1433371664-8490-1-git-send-email-chris.j.arges at canonical.com>
>>
>> From: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
>>
>> BugLink: http://bugs.launchpad.net/bugs/1461553
>>
>> Present code checks for update_flash_data in opal_flash_term_callback().
>> update_flash_data has been statically initialized to zero, and that
>> is the value of FLASH_IMG_READY. Also code update initialization happens
>> during subsys init.
>>
>> So if reboot is issued before the subsys init stage then we endup
>> displaying
>> "Flashing new firmware" message.. which may confuse end user.
>>
>> This patch fixes above described issue by initializes update_flash status
>> to invalid state.
>>
>> Reported-by: Sam Bobroff <sam.bobroff at au1.ibm.com>
>> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
>> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
>> (cherry picked from commit 3f77df7f81526c932ef681eda56eeaa75d0617da)
>> Signed-off-by: Chris J Arges <chris.j.arges at canonical.com>
>> ---
>> arch/powerpc/platforms/powernv/opal-flash.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/platforms/powernv/opal-flash.c
>> b/arch/powerpc/platforms/powernv/opal-flash.c
>> index 5c21d9c..0ff07ff 100644
>> --- a/arch/powerpc/platforms/powernv/opal-flash.c
>> +++ b/arch/powerpc/platforms/powernv/opal-flash.c
>> @@ -120,7 +120,11 @@ static struct image_header_t image_header;
>> static struct image_data_t image_data;
>> static struct validate_flash_t validate_flash_data;
>> static struct manage_flash_t manage_flash_data;
>> -static struct update_flash_t update_flash_data;
>> +
>> +/* Initialize update_flash_data status to No Operation */
>> +static struct update_flash_t update_flash_data = {
>> + .status = FLASH_NO_OP,
>> +};
>>
>> static DEFINE_MUTEX(image_data_mutex);
>>
>> --
>> 1.9.1
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 4
>> From: brad.figg at canonical.com
>> To: kernel-team at lists.ubuntu.com
>> Subject: The Daily Bug Report for Wednesday, 03. June 2015 22:30 UTC
>> Message-ID:
>> <mailman.12556.1433411172.18832.kernel-team at lists.ubuntu.com>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> The Daily Bug Report
>> Wednesday, 03. June 2015 22:30 UTC
>>
>> The linux package acquired 4 new bugs in the last 24 hrs.
>>
>> Bug Title
>> Series Importance Status Assignee
>> ------- ------------------------------------------------------------
>> -------- ------------ ------------- ---------------------
>> 1461320 first resume fails after suspend
>> vivid Medium Confirmed Unassigned
>> 1461463 package linux-image-3.16.0-36-generic (not installed) fai...
>> utopic Low Incomplete Unassigned
>> 1461599 Trying to install Ubuntu 14.04, but system rebootin again...
>> trusty Undecided Incomplete Unassigned
>> 1461700 package linux-image-3.13.0-53-generic 3.13.0-53.89 failed...
>> trusty Undecided New Unassigned
>>
>> An online version of this report can be found at:
>> http://kernel.ubuntu.com/sru/1-day-new.html
>> The full Kernel Team Host List can be found at:
>> http://people.canonical.com/~kernel/reports/_kernel_hot_.html
>>
>>
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Thu, 4 Jun 2015 17:43:53 +0900
>> From: Seyeong Kim <seyeong.kim at canonical.com>
>> To: kernel-team at lists.ubuntu.com
>> Subject: [Trusty][SRU][PATCH] LP#1461730 -- xfs: avoid false
>> quotacheck after unclean shutdown
>> Message-ID:
>> <1433407434-32622-1-git-send-email-seyeong.kim at canonical.com>
>>
>> BugLink: http://bugs.launchpad.net/bugs/1461730
>>
>> [Impact]
>>
>> XFS quota doesn't work after rebooting because of crash or force reboot.
>> You can see msg on dmesg.
>> [ 12.309146] XFS (sdb): Failed to initialize disk quotas.
>>
>> [Fix]
>>
>> Upstream development
>> 5ef828c41527 ("xfs: avoid false quotacheck after unclean shutdown")
>>
>> It's affected under 3.17 kernel.
>>
>> * fixed directory mismatch
>>
>> There was no libxfs directory on fs/xfs/, I modified upstream
>> fs/xfs/libxfs/xfs_sb.c to proper position /fs/xfs/xfs_sb.c on ubuntu.
>>
>> [Testcase]
>>
>> mkfs.xfs for your extra storage, set the quota 2G with it. Using the
>> command "dd if=/dev/zero of=test bs=1M count=3000", You can see that they
>> have quota 2G at first. But after force rebooting, you can see that they
>> don't limit quota. You can make 3G on 2G quota set directory.
>>
>> Eric Sandeen (1):
>> xfs: avoid false quotacheck after unclean shutdown
>>
>> fs/xfs/xfs_mount.c | 1 -
>> fs/xfs/xfs_sb.c | 26 ++++++++++++++++++++++----
>> 2 files changed, 22 insertions(+), 5 deletions(-)
>>
>> --
>> 2.1.4
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 6
>> Date: Thu, 4 Jun 2015 17:43:54 +0900
>> From: Seyeong Kim <seyeong.kim at canonical.com>
>> To: kernel-team at lists.ubuntu.com
>> Subject: [Trusty][SRU][PATCH] xfs: avoid false quotacheck after
>> unclean shutdown
>> Message-ID:
>> <1433407434-32622-2-git-send-email-seyeong.kim at canonical.com>
>>
>> From: Eric Sandeen <sandeen at sandeen.net>
>>
>> BugLink: http://bugs.launchpad.net/bugs/1461730
>>
>> The commit
>>
>> 83e782e xfs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD
>>
>> added a new function xfs_sb_quota_from_disk() which swaps
>> on-disk XFS_OQUOTA_* flags for in-core XFS_GQUOTA_* and XFS_PQUOTA_*
>> flags after the superblock is read.
>>
>> However, if log recovery is required, the superblock is read again,
>> and the modified in-core flags are re-read from disk, so we have
>> XFS_OQUOTA_* flags in memory again. This causes the
>> XFS_QM_NEED_QUOTACHECK() test to be true, because the XFS_OQUOTA_CHKD
>> is still set, and not XFS_GQUOTA_CHKD or XFS_PQUOTA_CHKD.
>>
>> Change xfs_sb_from_disk to call xfs_sb_quota_from disk and always
>> convert the disk flags to in-memory flags.
>>
>> Add a lower-level function which can be called with "false" to
>> not convert the flags, so that the sb verifier can verify
>> exactly what was on disk, per Brian Foster's suggestion.
>>
>> Reported-by: Cyril B. <cbay at excellency.fr>
>> Signed-off-by: Eric Sandeen <sandeen at redhat.com>
>>
>> (backported from commit 5ef828c4152726f56751c78ea844f08d2b2a4fa3)
>> Signed-off-by: Seyeong Kim <seyeong.kim at canonical.com>
>>
>> Conflicts:
>> fs/xfs/libxfs/xfs_sb.c
>> fs/xfs/xfs_mount.c
>> ---
>> fs/xfs/xfs_mount.c | 1 -
>> fs/xfs/xfs_sb.c | 26 ++++++++++++++++++++++----
>> 2 files changed, 22 insertions(+), 5 deletions(-)
>>
>> diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
>> index 02df7b4..e853572 100644
>> --- a/fs/xfs/xfs_mount.c
>> +++ b/fs/xfs/xfs_mount.c
>> @@ -314,7 +314,6 @@ reread:
>> * Initialize the mount structure from the superblock.
>> */
>> xfs_sb_from_disk(&mp->m_sb, XFS_BUF_TO_SBP(bp));
>> - xfs_sb_quota_from_disk(&mp->m_sb);
>>
>> /*
>> * We must be able to do sector-sized and sector-aligned IO.
>> diff --git a/fs/xfs/xfs_sb.c b/fs/xfs/xfs_sb.c
>> index b7c9aea..6301f33 100644
>> --- a/fs/xfs/xfs_sb.c
>> +++ b/fs/xfs/xfs_sb.c
>> @@ -398,10 +398,13 @@ xfs_sb_quota_from_disk(struct xfs_sb *sbp)
>> }
>> }
>>
>> -void
>> -xfs_sb_from_disk(
>> +
>> +
>> +static void
>> +__xfs_sb_from_disk(
>> struct xfs_sb *to,
>> - xfs_dsb_t *from)
>> + xfs_dsb_t *from,
>> + bool convert_xquota)
>> {
>> to->sb_magicnum = be32_to_cpu(from->sb_magicnum);
>> to->sb_blocksize = be32_to_cpu(from->sb_blocksize);
>> @@ -457,6 +460,17 @@ xfs_sb_from_disk(
>> to->sb_pad = 0;
>> to->sb_pquotino = be64_to_cpu(from->sb_pquotino);
>> to->sb_lsn = be64_to_cpu(from->sb_lsn);
>> + /* Convert on-disk flags to in-memory flags? */
>> + if (convert_xquota)
>> + xfs_sb_quota_from_disk(to);
>> +}
>> +
>> +void
>> +xfs_sb_from_disk(
>> + struct xfs_sb *to,
>> + xfs_dsb_t *from)
>> +{
>> + __xfs_sb_from_disk(to, from, true);
>> }
>>
>> static inline void
>> @@ -572,7 +586,11 @@ xfs_sb_verify(
>> struct xfs_mount *mp = bp->b_target->bt_mount;
>> struct xfs_sb sb;
>>
>> - xfs_sb_from_disk(&sb, XFS_BUF_TO_SBP(bp));
>> + /*
>> + * Use call variant which doesn't convert quota flags from disk
>> + * format, because xfs_mount_validate_sb checks the on-disk flags.
>> + */
>> + __xfs_sb_from_disk(&sb, XFS_BUF_TO_SBP(bp), false);
>>
>> /*
>> * Only check the in progress field for the primary superblock as
>> --
>> 2.1.4
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 7
>> Date: Thu, 4 Jun 2015 17:45:52 +0800
>> From: Wen-chien Jesse Sung <jesse.sung at canonical.com>
>> To: kernel-team at lists.ubuntu.com
>> Subject: [Vivid][PATCH 1/6] Bluetooth: btusb: support public address
>> configuration for ath3012
>> Message-ID:
>> <1433411157-26049-1-git-send-email-jesse.sung at canonical.com>
>>
>> From: Toshi Kikuchi <toshik at chromium.org>
>>
>> BugLink: https://launchpad.net/bugs/1459937
>>
>> Set hdev->set_bdaddr handler for ath3012. It sends the vendor specific HCI
>> command to change the public address. The change doesn't persist across
>> power cycle.
>>
>> Signed-off-by: Toshi Kikuchi <toshik at chromium.org>
>> Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
>> (cherry picked from commit 5859223e0c4f69ab36dd931ea7058c3b1b2abb41)
>> Signed-off-by: Wen-chien Jesse Sung <jesse.sung at canonical.com>
>> ---
>> drivers/bluetooth/btusb.c | 28 ++++++++++++++++++++++++++++
>> 1 file changed, 28 insertions(+)
>>
>> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
>> index b0449bb..7134171 100644
>> --- a/drivers/bluetooth/btusb.c
>> +++ b/drivers/bluetooth/btusb.c
>> @@ -1953,6 +1953,31 @@ static int btusb_set_bdaddr_bcm(struct hci_dev
>> *hdev, const bdaddr_t *bdaddr)
>> return 0;
>> }
>>
>> +static int btusb_set_bdaddr_ath3012(struct hci_dev *hdev,
>> + const bdaddr_t *bdaddr)
>> +{
>> + struct sk_buff *skb;
>> + u8 buf[10];
>> + long ret;
>> +
>> + buf[0] = 0x01;
>> + buf[1] = 0x01;
>> + buf[2] = 0x00;
>> + buf[3] = sizeof(bdaddr_t);
>> + memcpy(buf + 4, bdaddr, sizeof(bdaddr_t));
>> +
>> + skb = __hci_cmd_sync(hdev, 0xfc0b, sizeof(buf), buf,
>> HCI_INIT_TIMEOUT);
>> + if (IS_ERR(skb)) {
>> + ret = PTR_ERR(skb);
>> + BT_ERR("%s: Change address command failed (%ld)",
>> + hdev->name, ret);
>> + return ret;
>> + }
>> + kfree_skb(skb);
>> +
>> + return 0;
>> +}
>> +
>> static int btusb_probe(struct usb_interface *intf,
>> const struct usb_device_id *id)
>> {
>> @@ -2068,6 +2093,9 @@ static int btusb_probe(struct usb_interface *intf,
>> if (id->driver_info & BTUSB_INTEL_BOOT)
>> set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
>>
>> + if (id->driver_info & BTUSB_ATH3012)
>> + hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
>> +
>> /* Interface numbers are hardcoded in the specification */
>> data->isoc = usb_ifnum_to_if(data->udev, 1);
>>
>> --
>> 2.1.4
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 8
>> Date: Thu, 4 Jun 2015 17:45:53 +0800
>> From: Wen-chien Jesse Sung <jesse.sung at canonical.com>
>> To: kernel-team at lists.ubuntu.com
>> Subject: [Vivid][PATCH 2/6] Bluetooth: btusb: Add setup callback for
>> chip init on USB
>> Message-ID:
>> <1433411157-26049-2-git-send-email-jesse.sung at canonical.com>
>>
>> From: "Kim, Ben Young Tae" <ytkim at qca.qualcomm.com>
>>
>> BugLink: https://launchpad.net/bugs/1459937
>>
>> Some of chipset does not allow to send a patch or config files through
>> HCI VS channel at early stage as well as they don't support to send
>> USB patch files to other channel except USB bulk path.
>>
>> New callback added is for initialization of BT controller through USB
>>
>> Signed-off-by: Ben Young Tae Kim <ytkim at qca.qualcomm.com>
>> Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
>> (cherry picked from commit ace31982585a323afb194f56b9e0486f7bc6570c)
>> Signed-off-by: Wen-chien Jesse Sung <jesse.sung at canonical.com>
>> ---
>> drivers/bluetooth/btusb.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
>> index 7134171..1677d8e 100644
>> --- a/drivers/bluetooth/btusb.c
>> +++ b/drivers/bluetooth/btusb.c
>> @@ -316,6 +316,8 @@ struct btusb_data {
>> int suspend_count;
>>
>> int (*recv_bulk)(struct btusb_data *data, void *buffer, int
>> count);
>> +
>> + int (*setup_on_usb)(struct hci_dev *hdev);
>> };
>>
>> static inline void btusb_free_frags(struct btusb_data *data)
>> @@ -857,6 +859,15 @@ static int btusb_open(struct hci_dev *hdev)
>>
>> BT_DBG("%s", hdev->name);
>>
>> + /* Patching USB firmware files prior to starting any URBs of HCI
>> path
>> + * It is more safe to use USB bulk channel for downloading USB
>> patch
>> + */
>> + if (data->setup_on_usb) {
>> + err = data->setup_on_usb(hdev);
>> + if (err <0)
>> + return err;
>> + }
>> +
>> err = usb_autopm_get_interface(data->intf);
>> if (err < 0)
>> return err;
>> --
>> 2.1.4
>>
>>
>>
>>
>> ------------------------------
>>
>> --
>> kernel-team mailing list
>> kernel-team at lists.ubuntu.com
>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>
>>
>> End of kernel-team Digest, Vol 125, Issue 9
>> *******************************************
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20150604/cc6a02e7/attachment.html>
More information about the kernel-team
mailing list