Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mhi-for-v6.13' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next

Manivannan writes:

MHI Host
========

- Fixed typo in the comments section

- Fixed the sparse warning in MHI trace by converting the inputs to native
endian instead of passing little endian fields.

- Used pcim_iomap_region() API to request and map the MHI BAR. This removes the
usage of deprecated pcim_iomap_regions() and pcim_iomap_table() APIs.

* tag 'mhi-for-v6.13' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi:
bus: mhi: host: pci_generic: Use pcim_iomap_region() to request and map MHI BAR
bus: mhi: host: Switch trace_mhi_gen_tre fields to native endian
bus: mhi: host: Fix typos in the comments

+19 -18
+2 -2
drivers/bus/mhi/host/boot.c
··· 82 82 * other cores to shutdown while we're collecting RDDM buffer. After 83 83 * returning from this function, we expect the device to reset. 84 84 * 85 - * Normaly, we read/write pm_state only after grabbing the 85 + * Normally, we read/write pm_state only after grabbing the 86 86 * pm_lock, since we're in a panic, skipping it. Also there is no 87 - * gurantee that this state change would take effect since 87 + * guarantee that this state change would take effect since 88 88 * we're setting it w/o grabbing pm_lock 89 89 */ 90 90 mhi_cntrl->pm_state = MHI_PM_LD_ERR_FATAL_DETECT;
+1 -1
drivers/bus/mhi/host/internal.h
··· 255 255 /* 256 256 * Important: When consuming, increment tre_ring first and when 257 257 * releasing, decrement buf_ring first. If tre_ring has space, buf_ring 258 - * is guranteed to have space so we do not need to check both rings. 258 + * is guaranteed to have space so we do not need to check both rings. 259 259 */ 260 260 struct mhi_ring buf_ring; 261 261 struct mhi_ring tre_ring;
+3 -3
drivers/bus/mhi/host/pci_generic.c
··· 917 917 return err; 918 918 } 919 919 920 - err = pcim_iomap_regions(pdev, 1 << bar_num, pci_name(pdev)); 921 - if (err) { 920 + mhi_cntrl->regs = pcim_iomap_region(pdev, 1 << bar_num, pci_name(pdev)); 921 + if (IS_ERR(mhi_cntrl->regs)) { 922 + err = PTR_ERR(mhi_cntrl->regs); 922 923 dev_err(&pdev->dev, "failed to map pci region: %d\n", err); 923 924 return err; 924 925 } 925 - mhi_cntrl->regs = pcim_iomap_table(pdev)[bar_num]; 926 926 mhi_cntrl->reg_len = pci_resource_len(pdev, bar_num); 927 927 928 928 err = dma_set_mask_and_coherent(&pdev->dev, dma_mask);
+13 -12
drivers/bus/mhi/host/trace.h
··· 9 9 #if !defined(_TRACE_EVENT_MHI_HOST_H) || defined(TRACE_HEADER_MULTI_READ) 10 10 #define _TRACE_EVENT_MHI_HOST_H 11 11 12 + #include <linux/byteorder/generic.h> 12 13 #include <linux/tracepoint.h> 13 14 #include <linux/trace_seq.h> 14 15 #include "../common.h" ··· 98 97 __string(name, mhi_cntrl->mhi_dev->name) 99 98 __field(int, ch_num) 100 99 __field(void *, wp) 101 - __field(__le64, tre_ptr) 102 - __field(__le32, dword0) 103 - __field(__le32, dword1) 100 + __field(uint64_t, tre_ptr) 101 + __field(uint32_t, dword0) 102 + __field(uint32_t, dword1) 104 103 ), 105 104 106 105 TP_fast_assign( 107 106 __assign_str(name); 108 107 __entry->ch_num = mhi_chan->chan; 109 108 __entry->wp = mhi_tre; 110 - __entry->tre_ptr = mhi_tre->ptr; 111 - __entry->dword0 = mhi_tre->dword[0]; 112 - __entry->dword1 = mhi_tre->dword[1]; 109 + __entry->tre_ptr = le64_to_cpu(mhi_tre->ptr); 110 + __entry->dword0 = le32_to_cpu(mhi_tre->dword[0]); 111 + __entry->dword1 = le32_to_cpu(mhi_tre->dword[1]); 113 112 ), 114 113 115 114 TP_printk("%s: Chan: %d TRE: 0x%p TRE buf: 0x%llx DWORD0: 0x%08x DWORD1: 0x%08x\n", ··· 177 176 178 177 TP_STRUCT__entry( 179 178 __string(name, mhi_cntrl->mhi_dev->name) 180 - __field(__le32, dword0) 181 - __field(__le32, dword1) 179 + __field(uint32_t, dword0) 180 + __field(uint32_t, dword1) 182 181 __field(int, state) 183 - __field(__le64, ptr) 182 + __field(uint64_t, ptr) 184 183 __field(void *, rp) 185 184 ), 186 185 187 186 TP_fast_assign( 188 187 __assign_str(name); 189 188 __entry->rp = rp; 190 - __entry->ptr = rp->ptr; 191 - __entry->dword0 = rp->dword[0]; 192 - __entry->dword1 = rp->dword[1]; 189 + __entry->ptr = le64_to_cpu(rp->ptr); 190 + __entry->dword0 = le32_to_cpu(rp->dword[0]); 191 + __entry->dword1 = le32_to_cpu(rp->dword[1]); 193 192 __entry->state = MHI_TRE_GET_EV_STATE(rp); 194 193 ), 195 194